





import math





def 				__lowerCAmelCase(       )							-> None:




    """simple docstring"""




    _A     =							input('Enter message: '				)
    _A     =							int(input(F"Enter key [2-{len(_SCREAMING_SNAKE_CASE				) - 1}]: "				)				)
    _A     =							input('Encryption/Decryption [e/d]: '				)

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

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





def 				__lowerCAmelCase(       _SCREAMING_SNAKE_CASE							,     _SCREAMING_SNAKE_CASE				)							-> str:




    """simple docstring"""




    _A     =							[""""""] * key
    for col in range(_SCREAMING_SNAKE_CASE				):
        _A     =							col
        while pointer < len(_SCREAMING_SNAKE_CASE				):
            cipher_text[col] += message[pointer]
            pointer += key
    return "".join(_SCREAMING_SNAKE_CASE				)





def 				__lowerCAmelCase(       _SCREAMING_SNAKE_CASE							,     _SCREAMING_SNAKE_CASE				)							-> str:




    """simple docstring"""




    _A     =							math.ceil(len(_SCREAMING_SNAKE_CASE				) / key				)
    _A     =							key
    _A     =							(num_cols * num_rows) - len(_SCREAMING_SNAKE_CASE				)
    _A     =							[""""""] * num_cols
    _A     =							0
    _A     =							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)
        ):
            _A     =							0
            row += 1

    return "".join(_SCREAMING_SNAKE_CASE				)


if __name__ == "__main__":
 import doctest

 doctest.testmod()
 main()








"""simple docstring"""
import math




def 					a__						(						lowerCAmelCase    )	-> list[int]:
      UpperCAmelCase__			:							Optional[int]							=    []
      UpperCAmelCase__			:							Union[str, Any]							=    2
      UpperCAmelCase__			:							List[Any]							=    int(math.sqrt(lowerCAmelCase    )    )  # Size of every segment
      UpperCAmelCase__			:							Dict							=    [True] * (end + 1)
      UpperCAmelCase__			:							str							=    []

      while start <= end:
            if temp[start] is True:
                  in_prime.append(lowerCAmelCase    )
                  for i in range(start * start			,	end + 1			,	lowerCAmelCase    ):
                        UpperCAmelCase__			:							Optional[Any]							=    False
            start += 1
      prime += in_prime

      UpperCAmelCase__			:							Optional[Any]							=    end + 1
      UpperCAmelCase__			:							Dict							=    min(2 * end			,	lowerCAmelCase    )

      while low <= n:
            UpperCAmelCase__			:							Optional[int]							=    [True] * (high - low + 1)
            for each in in_prime:
                  UpperCAmelCase__			:							Optional[int]							=    math.floor(low / each    ) * each
                  if t < low:
                        t += each

                  for j in range(lowerCAmelCase			,	high + 1			,	lowerCAmelCase    ):
                        UpperCAmelCase__			:							int							=    False

            for j in range(len(lowerCAmelCase    )    ):
                  if temp[j] is True:
                        prime.append(j + low    )

            UpperCAmelCase__			:							Dict							=    high + 1
            UpperCAmelCase__			:							int							=    min(high + end			,	lowerCAmelCase    )

      return prime





print(sieve(10**6))

