My Free Pascal entry for Codecup 2014