Masudur Rahman Sourav's submission of ATM | CodeChef