p056.py: solution to p056