poj3 for Techer mission