"""
A palindromic number reads the same both ways. The largest palindrome made from the product of
two 2-digit numbers is 9009 = 91 × 99.

Find the largest palindrome made from the product of two 3-digit numbers.
"""


def is_palindrome(value):
    value = str(value)
    if value == value[::-1]:
        return True

largest = 0
for x in range(100, 999):
    for y in range(100, 999):
        z = x * y
        if is_palindrome(z):
            if z > largest:
                largest = z

print(largest)