add ex39.py