A solution of POJ 2253 Frogger