Create problem40.py