US judge retires from bench in Montana after 36 years