Modified for contest output. Moved GUI to another repository.