p489 solved