Kunal Kalsi's submission of ATM | CodeChef