
import math




def 							__SCREAMING_SNAKE_CASE   (		)     ->						Any:
				__lowercase								=					input('Enter message: '			)
				__lowercase								=					int(input(F"""Enter key [2-{len(_UpperCAmelCase			) - 1}]: """			)			)
				__lowercase								=					input('Encryption/Decryption [e/d]: '			)

				if mode.lower().startswith('e'			):
								__lowercase								=					encrypt_message(_UpperCAmelCase    ,							_UpperCAmelCase			)
				elif mode.lower().startswith('d'			):
								__lowercase								=					decrypt_message(_UpperCAmelCase    ,							_UpperCAmelCase			)

				# Append pipe symbol (vertical bar) to identify spaces at the end.
				print(F"""Output:\n{text + "|"}"""			)




def 							__SCREAMING_SNAKE_CASE   (		SCREAMING_SNAKE_CASE       :      Dict    ,							SCREAMING_SNAKE_CASE       :      List[Any]			)     ->						Any:
				__lowercase								=					[''] * key
				for col in range(_UpperCAmelCase			):
								__lowercase								=					col
								while pointer < len(_UpperCAmelCase			):
												cipher_text[col] += message[pointer]
												pointer += key
				return "".join(_UpperCAmelCase			)




def 							__SCREAMING_SNAKE_CASE   (		SCREAMING_SNAKE_CASE       :      Dict    ,							SCREAMING_SNAKE_CASE       :      Optional[Any]			)     ->						int:
				__lowercase								=					math.ceil(len(_UpperCAmelCase			) / key			)
				__lowercase								=					key
				__lowercase								=					(num_cols * num_rows) - len(_UpperCAmelCase			)
				__lowercase								=					[''] * num_cols
				__lowercase								=					0
				__lowercase								=					0

				for symbol in message:
								plain_text[col] += symbol
								col += 1

								if (
								    (col == num_cols)
								    or (col == num_cols - 1)
								    and (row >= num_rows - num_shaded_boxes)
								):
												__lowercase								=					0
												row += 1

				return "".join(_UpperCAmelCase			)


if __name__ == "__main__":
							import doctest

							doctest.testmod()
							main()












"""simple docstring"""




def 						UpperCAmelCase__		(     _UpperCAmelCase					):






  """simple docstring"""





  if isinstance(_UpperCAmelCase ,					_UpperCAmelCase					):
    raise TypeError('\'float\' object cannot be interpreted as an integer'					)
  if isinstance(_UpperCAmelCase ,					_UpperCAmelCase					):
    raise TypeError('\'str\' object cannot be interpreted as an integer'					)

  if num == 0:
    return "0b0"

  A_  :       str										=  False

  if num < 0:
    A_  :       Dict										=  True
    A_  :       Union[str, Any]										=  -num

  A_  :       list[int]										=  []
  while num > 0:
    binary.insert(0 ,					num % 2					)
    num >>= 1

  if negative:
    return "-0b" + "".join(str(_UpperCAmelCase					) for e in binary					)

  return "0b" + "".join(str(_UpperCAmelCase					) for e in binary					)


if __name__ == "__main__":
   import doctest

   doctest.testmod()