palsquare solution