Т за ЗМ 4

Time limit: 5 mins

Grading method: Highest grade