Closest class period chooser.