Ivan Kazmenko's submission of Andrew and the Strings | CodeChef