solved a couple of problems
PALIN problem

Got TLE