Pension and Other Postretirement Benefits (Details) - USD ($)
$ in Thousands
3 Months Ended 9 Months Ended
Apr. 30, 2022
Apr. 30, 2021
Apr. 30, 2022
Apr. 30, 2021
Pension Plan        
Defined Benefit Plans and Other Postretirement Benefit Plans        
Interest cost $ 267 $ 292 $ 801 $ 875
Expected return on plan assets (646) (722) (1,939) (2,166)
Amortization of Other actuarial loss 36 218 108 653
Net periodic benefit cost (343) (212) (1,030) (638)
Postretirement Health Plan        
Defined Benefit Plans and Other Postretirement Benefit Plans        
Service cost 31 35 92 104
Interest cost 15 13 44 38
Amortization of Other actuarial loss 0 1 0 3
Amortization of Prior service costs (2) (2) (5) (5)
Net periodic benefit cost $ 44 $ 47 $ 131 $ 140