Arvind 's submission of ATM | CodeChef