Gennady Korotkevich's submission of Bad Luck | CodeChef