Tej's submission of ATM | CodeChef