Sergey Kulik's submission of A Story with Strings | CodeChef