Maciej Gawron's submission of Jam | CodeChef