





_UpperCAmelCase										=					1_0**8




def 			lowerCAmelCase_			(				UpperCamelCase_	)  ->		bool:
       if n % 10 == 0:
              return False
       UpperCamelCase_ 							=	str(UpperCamelCase_	)
       return s == s[::-1]




def 			lowerCAmelCase_			(				)  ->		int:
       UpperCamelCase_ 							=	set()
       UpperCamelCase_ 							=	1
       UpperCamelCase_ 							=	5
       while sum_squares < LIMIT:
              UpperCamelCase_ 							=	first_square + 1
              while sum_squares < LIMIT:
                     if is_palindrome(UpperCamelCase_	):
                            answer.add(UpperCamelCase_	)
                     last_square += 1
                     sum_squares += last_square**2
              first_square += 1
              UpperCamelCase_ 							=	first_square**2 + (first_square + 1) ** 2

       return sum(UpperCamelCase_	)


if __name__ == "__main__":
     print(solution())








from __future__ import annotations




def 			lowerCAmelCase_			(				UpperCamelCase_	)  ->		int | None:
       for r in range(1       ,		UpperCamelCase_	):
              UpperCamelCase_ 							=	[]
              for x in range(n - 1	):
                     UpperCamelCase_ 							=	pow(UpperCamelCase_       ,		UpperCamelCase_       ,		UpperCamelCase_	)
                     if val in li:
                            break
                     li.append(UpperCamelCase_	)
              else:
                     return r
       return None


if __name__ == "__main__":
     _UpperCAmelCase										=					int(input('Enter a prime number q: '))
     _UpperCAmelCase										=					find_primitive(q)
     if a is None:
          print(f'''Cannot find the primitive for the value: {a!r}''')
     else:
          _UpperCAmelCase										=					int(input('Enter private key of A: '))
          _UpperCAmelCase										=					pow(a, a_private, q)
          _UpperCAmelCase										=					int(input('Enter private key of B: '))
          _UpperCAmelCase										=					pow(a, b_private, q)

          _UpperCAmelCase										=					pow(b_public, a_private, q)
          _UpperCAmelCase										=					pow(a_public, b_private, q)

          print('The key value generated by A is: ', a_secret)
          print('The key value generated by B is: ', b_secret)

