solution to palinodrome_product.py