solved p15 in python