Resul Hangeldiyev's submission of ATM | CodeChef