def Pal(n):
    for i in range(len(str(n))):
        if str(n)[i] != str(n)[len(str(n)) - 1 - i]:
            break
    else:
        return 'yay'


a = []
for i in range(100, 1000):
    for j in range(100, 1000):
        b = i * j
        if Pal(b) == 'yay':
            a.append(b)
print(max(a))

506c15a8a6a340f873e6cfd36e002f1174a470c4
<mask token>

def Pal(n):
    for i in range(len(str(n))):
        if str(n)[i] != str(n)[len(str(n)) - 1 - i]:
            break
    else:
        return 'yay'


<mask token>

def Pal(n):
    for i in range(len(str(n))):
        if str(n)[i] != str(n)[len(str(n)) - 1 - i]:
            break
    else:
        return 'yay'


<mask token>
for i in range(100, 1000):
    for j in range(100, 1000):
        b = i * j
        if Pal(b) == 'yay':
            a.append(b)
print(max(a))

def Pal(n):
    for i in range(len(str(n))):
        if str(n)[i] != str(n)[len(str(n)) - 1 - i]:
            break
    else:
        return 'yay'


a = []
for i in range(100, 1000):
    for j in range(100, 1000):
        b = i * j
        if Pal(b) == 'yay':
            a.append(b)
print(max(a))
