

import math





def    __lowerCamelCase      (					):







							'''simple docstring'''






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

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

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





def    __lowerCamelCase      (					UpperCamelCase__  ,				UpperCamelCase__ ):







							'''simple docstring'''






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





def    __lowerCamelCase      (					UpperCamelCase__  ,				UpperCamelCase__ ):







							'''simple docstring'''






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

							return "".join(UpperCamelCase__ )


if __name__ == "__main__":
					import doctest

					doctest.testmod()
					main()







from math import sqrt





def    __lowerCamelCase      (					UpperCamelCase__ ):







							'''simple docstring'''






							if 1 < number < 4:
														# 2 and 3 are primes
														return True
							elif number < 2 or number % 2 == 0 or number % 3 == 0:
														# Negatives, 0, 1, all even numbers, all multiples of 3 are not primes
														return False

							# All primes number are in format of 6k +/- 1
							for i in range(5  ,				int(sqrt(UpperCamelCase__ ) + 1 )  ,				6 ):
														if number % i == 0 or number % (i + 2) == 0:
																					return False
							return True





def    __lowerCamelCase      (					UpperCamelCase__ = 10001 ):







							'''simple docstring'''






							snake_case_     							=       0
							snake_case_     							=       1
							while count != nth and number < 3:
														number += 1
														if is_prime(UpperCamelCase__ ):
																					count += 1
							while count != nth:
														number += 2
														if is_prime(UpperCamelCase__ ):
																					count += 1
							return number


if __name__ == "__main__":
					print(F'''{solution() = }''')




