solved problem 19 in python