

"""simple docstring"""




from string import ascii_uppercase

__UpperCAmelCase =				{char: i for i, char in enumerate(ascii_uppercase)}
__UpperCAmelCase =				dict(enumerate(ascii_uppercase))
def   lowerCAmelCase						(					__UpperCamelCase							,    __UpperCamelCase      ):
 '''simple docstring'''





 UpperCAmelCase__					:  int					   =					len(__UpperCamelCase      )
 UpperCAmelCase__					:  Union[str, Any]					   =					0
 while True:
  if x == i:
   UpperCAmelCase__					:  List[str]					   =					0
  if len(__UpperCamelCase      ) == len(__UpperCamelCase      ):
   break
  key += key[i]
  i += 1
 return key
def   lowerCAmelCase						(					__UpperCamelCase							,    __UpperCamelCase      ):
 '''simple docstring'''





 UpperCAmelCase__					:  Optional[Any]					   =					""""""
 UpperCAmelCase__					:  Tuple					   =					0
 for letter in message:
  if letter == " ":
   cipher_text += " "
  else:
   UpperCAmelCase__					:  int					   =					(dicta[letter] - dicta[key_new[i]]) % 26
   i += 1
   cipher_text += dicta[x]
 return cipher_text
def   lowerCAmelCase						(					__UpperCamelCase							,    __UpperCamelCase      ):
 '''simple docstring'''





 UpperCAmelCase__					:  List[str]					   =					""""""
 UpperCAmelCase__					:  List[str]					   =					0
 for letter in cipher_text:
  if letter == " ":
   or_txt += " "
  else:
   UpperCAmelCase__					:  Tuple					   =					(dicta[letter] + dicta[key_new[i]] + 26) % 26
   i += 1
   or_txt += dicta[x]
 return or_txt
def   lowerCAmelCase						(					):
 '''simple docstring'''





 UpperCAmelCase__					:  List[Any]					   =					"""THE GERMAN ATTACK"""
 UpperCAmelCase__					:  int					   =					"""SECRET"""
 UpperCAmelCase__					:  Union[str, Any]					   =					generate_key(__UpperCamelCase							,    __UpperCamelCase      )
 UpperCAmelCase__					:  Optional[int]					   =					cipher_text(__UpperCamelCase							,    __UpperCamelCase      )
 print(F"Encrypted Text = {s}"      )
 print(F"Original Text = {original_text(__UpperCamelCase							,    __UpperCamelCase      )}"      )


if __name__ == "__main__":
      import doctest

      doctest.testmod()
      main()








"""simple docstring"""




def   lowerCAmelCase						(					__UpperCamelCase = 1000      ):
 '''simple docstring'''





 return sum(2 * a * ((a - 1) // 2) for a in range(3							,    n + 1      )      )


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





