'''simple docstring'''





from collections.abc import Iterable
from typing import Generic, TypeVar

lowerCAmelCase_	:		Any			=     TypeVar("""_T""")




class 		SCREAMING_SNAKE_CASE     (					Generic[_T]	):







				'''simple docstring'''





				def __init__(						self					:						str       ,		lowercase__					:						Iterable[_T] | None = None					)							->None:


										'''simple docstring'''




										_UpperCamelCase			:			list[_T]   			=						list(iterable or []					)
										_UpperCamelCase			:			list[_T]   			=						[]





				def __len__(						self					:						str					)							->int:


										'''simple docstring'''




										return len(self._stacka					) + len(self._stacka					)





				def __repr__(						self					:						Optional[int]					)							->str:


										'''simple docstring'''




										return f'''Queue({tuple(self._stacka[::-1] + self._stacka					)})'''





				def  snake_case__				(						self					:						Tuple       ,		lowercase__					:						_T					)							->None:


										'''simple docstring'''




										self._stacka.append(lowercase__					)







				def  snake_case__				(						self					:						str					)							->_T:


										'''simple docstring'''




										_UpperCamelCase			:			Optional[Any]   			=						self._stacka.pop
										_UpperCamelCase			:			List[Any]   			=						self._stacka.append

										if not self._stacka:
																while self._stacka:
																						stacka_append(stacka_pop()					)

										if not self._stacka:
																raise IndexError("Queue is empty"					)
										return self._stacka.pop()


if __name__ == "__main__":
			from doctest import testmod

			testmod()



'''simple docstring'''





import random




class 		SCREAMING_SNAKE_CASE     :







				'''simple docstring'''





				@staticmethod
				def  snake_case__				(						lowercase__					:						str					)							->tuple[list[int], list[int]]:


										'''simple docstring'''




										_UpperCamelCase			:			List[str]   			=						[ord(lowercase__					) for i in text]
										_UpperCamelCase			:			Dict   			=						[]
										_UpperCamelCase			:			Optional[int]   			=						[]
										for i in plain:
																_UpperCamelCase			:			Tuple   			=						random.randint(1       ,		300					)
																_UpperCamelCase			:			Any   			=						(i + k) * k
																cipher.append(lowercase__					)
																key.append(lowercase__					)
										return cipher, key







				@staticmethod
				def  snake_case__				(						lowercase__					:						list[int]       ,		lowercase__					:						list[int]					)							->str:


										'''simple docstring'''




										_UpperCamelCase			:			int   			=						[]
										for i in range(len(lowercase__					)					):
																_UpperCamelCase			:			List[Any]   			=						int((cipher[i] - (key[i]) ** 2) / key[i]					)
																plain.append(chr(lowercase__					)					)
										return "".join(lowercase__					)


if __name__ == "__main__":
			lowerCAmelCase_	,	lowerCAmelCase_	:		Optional[int]			=     Onepad().encrypt("""Hello""")
			print(c, k)
			print(Onepad().decrypt(c, k))


