
'''simple docstring'''





def 							snake_case				(		UpperCAmelCase = 9_9_8_0_0_1						)->      int:







      """simple docstring"""
      __A													=      0
      for i in range(9_9_9   ,	9_9   ,	-1						):  # 3 digit numbers range from 999 down to 100
            for j in range(9_9_9   ,	9_9   ,	-1						):
                  __A													=      str(i * j						)
                  if product_string == product_string[::-1] and i * j < n:
                        __A													=      max(UpperCAmelCase   ,	i * j						)
      return answer


if __name__ == "__main__":
 print(f'''{solution() = }''')













def        A__						(							SCREAMING_SNAKE_CASE_				,							SCREAMING_SNAKE_CASE_				,							SCREAMING_SNAKE_CASE_		) ->  Dict:
		assert b != 0, "This cannot accept modulo that is == 0"
		if n == 0:
				return 1

		if n % 2 == 1:
				return (bin_exp_mod(SCREAMING_SNAKE_CASE_				,							n - 1				,							SCREAMING_SNAKE_CASE_		) * a) % b

		lowerCamelCase :			Tuple    		=bin_exp_mod(SCREAMING_SNAKE_CASE_				,							n / 2				,							SCREAMING_SNAKE_CASE_		)
		return (r * r) % b


if __name__ == "__main__":
				try:
								snake_case_				=      int(input('''Enter Base : ''').strip())
								snake_case_				=      int(input('''Enter Power : ''').strip())
								snake_case_				=      int(input('''Enter Modulo : ''').strip())
				except ValueError:
								print('''Invalid literal for integer''')

				print(bin_exp_mod(BASE, POWER, MODULO))

