



import math






def      _A				(UpperCamelCase		:      int )  ->str:



			'''simple docstring'''







			lowerCamelCase__ :      Tuple								=		0
			lowerCamelCase__ :      List[Any]								=		0
			while num > 0:
						lowerCamelCase__ :      Tuple								=		num % 8
						lowerCamelCase__ :      int								=		octal + (remainder * math.floor(math.pow(10      ,			UpperCamelCase ) ))
						counter += 1
						lowerCamelCase__ :      Dict								=		math.floor(num / 8 )  # basically /= 8 without remainder if any
						# This formatting removes trailing '.0' from `octal`.
			return f"0o{int(UpperCamelCase )}"






def      _A				()  ->None:



			'''simple docstring'''







			print("""\n2 in octal is:""" )
			print(decimal_to_octal(2 ) )  # = 2
			print("""\n8 in octal is:""" )
			print(decimal_to_octal(8 ) )  # = 10
			print("""\n65 in octal is:""" )
			print(decimal_to_octal(65 ) )  # = 101
			print("""\n216 in octal is:""" )
			print(decimal_to_octal(216 ) )  # = 330
			print("""\n512 in octal is:""" )
			print(decimal_to_octal(512 ) )  # = 1000
			print("""\n""" )


if __name__ == "__main__":
				main()








from string import ascii_uppercase

_lowercase     							=						{char: i for i, char in enumerate(ascii_uppercase)}
_lowercase     							=						dict(enumerate(ascii_uppercase))






def      _A				(UpperCamelCase		:      str      ,			UpperCamelCase		:      str )  ->str:



			'''simple docstring'''







			lowerCamelCase__ :      List[str]								=		len(UpperCamelCase )
			lowerCamelCase__ :      int								=		0
			while True:
						if x == i:
									lowerCamelCase__ :      Union[str, Any]								=		0
						if len(UpperCamelCase ) == len(UpperCamelCase ):
									break
						key += key[i]
						i += 1
			return key






def      _A				(UpperCamelCase		:      str      ,			UpperCamelCase		:      str )  ->str:



			'''simple docstring'''







			lowerCamelCase__ :      int								=		""""""
			lowerCamelCase__ :      str								=		0
			for letter in message:
						if letter == " ":
									cipher_text += " "
						else:
									lowerCamelCase__ :      Optional[int]								=		(dicta[letter] - dicta[key_new[i]]) % 26
									i += 1
									cipher_text += dicta[x]
			return cipher_text






def      _A				(UpperCamelCase		:      str      ,			UpperCamelCase		:      str )  ->str:



			'''simple docstring'''







			lowerCamelCase__ :      Dict								=		""""""
			lowerCamelCase__ :      Tuple								=		0
			for letter in cipher_text:
						if letter == " ":
									or_txt += " "
						else:
									lowerCamelCase__ :      List[Any]								=		(dicta[letter] + dicta[key_new[i]] + 26) % 26
									i += 1
									or_txt += dicta[x]
			return or_txt






def      _A				()  ->None:



			'''simple docstring'''







			lowerCamelCase__ :      Union[str, Any]								=		"""THE GERMAN ATTACK"""
			lowerCamelCase__ :      Union[str, Any]								=		"""SECRET"""
			lowerCamelCase__ :      List[str]								=		generate_key(UpperCamelCase      ,			UpperCamelCase )
			lowerCamelCase__ :      List[Any]								=		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()



