p1010 solving