Abhishek Jaiswal's submission of Pattern G | CodeChef