poj exercise