solution for p1: 233168
add template.py for future solutions