'''simple docstring'''

lowercase_  		=			{
    '''A''': ('''ABCDEFGHIJKLM''', '''NOPQRSTUVWXYZ'''),
    '''B''': ('''ABCDEFGHIJKLM''', '''NOPQRSTUVWXYZ'''),
    '''C''': ('''ABCDEFGHIJKLM''', '''ZNOPQRSTUVWXY'''),
    '''D''': ('''ABCDEFGHIJKLM''', '''ZNOPQRSTUVWXY'''),
    '''E''': ('''ABCDEFGHIJKLM''', '''YZNOPQRSTUVWX'''),
    '''F''': ('''ABCDEFGHIJKLM''', '''YZNOPQRSTUVWX'''),
    '''G''': ('''ABCDEFGHIJKLM''', '''XYZNOPQRSTUVW'''),
    '''H''': ('''ABCDEFGHIJKLM''', '''XYZNOPQRSTUVW'''),
    '''I''': ('''ABCDEFGHIJKLM''', '''WXYZNOPQRSTUV'''),
    '''J''': ('''ABCDEFGHIJKLM''', '''WXYZNOPQRSTUV'''),
    '''K''': ('''ABCDEFGHIJKLM''', '''VWXYZNOPQRSTU'''),
    '''L''': ('''ABCDEFGHIJKLM''', '''VWXYZNOPQRSTU'''),
    '''M''': ('''ABCDEFGHIJKLM''', '''UVWXYZNOPQRST'''),
    '''N''': ('''ABCDEFGHIJKLM''', '''UVWXYZNOPQRST'''),
    '''O''': ('''ABCDEFGHIJKLM''', '''TUVWXYZNOPQRS'''),
    '''P''': ('''ABCDEFGHIJKLM''', '''TUVWXYZNOPQRS'''),
    '''Q''': ('''ABCDEFGHIJKLM''', '''STUVWXYZNOPQR'''),
    '''R''': ('''ABCDEFGHIJKLM''', '''STUVWXYZNOPQR'''),
    '''S''': ('''ABCDEFGHIJKLM''', '''RSTUVWXYZNOPQ'''),
    '''T''': ('''ABCDEFGHIJKLM''', '''RSTUVWXYZNOPQ'''),
    '''U''': ('''ABCDEFGHIJKLM''', '''QRSTUVWXYZNOP'''),
    '''V''': ('''ABCDEFGHIJKLM''', '''QRSTUVWXYZNOP'''),
    '''W''': ('''ABCDEFGHIJKLM''', '''PQRSTUVWXYZNO'''),
    '''X''': ('''ABCDEFGHIJKLM''', '''PQRSTUVWXYZNO'''),
    '''Y''': ('''ABCDEFGHIJKLM''', '''OPQRSTUVWXYZN'''),
    '''Z''': ('''ABCDEFGHIJKLM''', '''OPQRSTUVWXYZN'''),
}



def 				UpperCamelCase__      (      a__   ):


						'''simple docstring'''






						return [alphabet[char] for char in key.upper()]



def 				UpperCamelCase__      (      a__      ,   a__   ):


						'''simple docstring'''






						_lowerCAmelCase					    =''
						_lowerCAmelCase					    =0
						_lowerCAmelCase					    =generate_table(a__   )
						for char in words.upper():
												cipher += get_opponent(table[count]      ,   a__   )
												_lowerCAmelCase					    =(count + 1) % len(a__   )
						return cipher



def 				UpperCamelCase__      (      a__      ,   a__   ):


						'''simple docstring'''






						return encrypt(a__      ,   a__   )



def 				UpperCamelCase__      (      a__      ,   a__   ):


						'''simple docstring'''






						_lowerCAmelCase					    =0 if char in table[0] else 1
						_lowerCAmelCase					    =table[row].index(a__   )
						return row, col



def 				UpperCamelCase__      (      a__      ,   a__   ):


						'''simple docstring'''






						_lowerCAmelCase    ,					_lowerCAmelCase					    =get_position(a__      ,   char.upper()   )
						if row == 1:
												return table[0][col]
						else:
												return table[1][col] if row == 0 else char


if __name__ == "__main__":
							import doctest

							doctest.testmod()  # Fist ensure that all our tests are passing...
							lowercase_  		=			input('''Enter key: ''').strip()
							lowercase_  		=			input('''Enter text to encrypt: ''').strip()
							lowercase_  		=			encrypt(key, text)

							print(F'Encrypted: {cipher_text}')
							print(F'Decrypted with key: {decrypt(key, cipher_text)}')






'''simple docstring'''

from itertools import compress, repeat
from math import ceil, sqrt



def 				UpperCamelCase__      (      a__   ):


						'''simple docstring'''






						if num <= 2:
												return []
						if num == 3:
												return [2]

						# Odd sieve for numbers in range [3, num - 1]
						_lowerCAmelCase					    =bytearray(B'\x01'   ) * ((num >> 1) - 1)

						for i in range(3      ,   int(sqrt(a__   )   ) + 1      ,   2   ):
												if sieve[(i >> 1) - 1]:
																		_lowerCAmelCase					    =i**2
																		_lowerCAmelCase					    =repeat(
																		    0      ,   ceil((num - i_squared) / (i << 1)   )   )

						return [2] + list(compress(range(3      ,   a__      ,   2   )      ,   a__   )   )


if __name__ == "__main__":
							import doctest

							doctest.testmod()





