Update 531.py

Changed the exits and the imports back. I prefer it THIS way. PEP8!