V Uday's submission of ATM | CodeChef