p1061 solved