Added solution for 8.py