Python problem 23. I'm not proud of this...
problem 24