Volodymyr Mykytsei's submission of ATM | CodeChef