avinash soni's submission of pattern7 | CodeChef