Shorya Kaushik's submission of ATM | CodeChef