Kartik's submission of ATM | CodeChef