apple pie's submission of Journey of the Knight | CodeChef