Added printing pallies up to N cpp