poj 1271 unfinished