#

target_row = 2981
target_col = 3075

current_value = 20151125

for row in range(2, target_col+target_row):
    for col in range(1, row+1):
        current_value = current_value * 252533
        current_value = current_value % 33554393
        if row - col + 1 == target_row and col == target_col:
            print(current_value)
            break
        #print(row-col+1, col, current_value)
