sol of q038
sol of q038 in py