solved problem32.py