Andrey's submission of Fombinatorial | CodeChef