Update problem39.py