updated i/o for uva10706
uva10706 solution