Add solution to words.py