Implement Hund's rules in Python.