Assignemt 9 working for selecting cities based on the deadline