Utkarsh Garg's submission of ATM | CodeChef