Shyam Bajaj's submission of ATM | CodeChef