poj 1271 Main.java unfinished