solved PAT2