Gennady Korotkevich's submission of Mysterious Sequence | CodeChef