

def    SCREAMING_SNAKE_CASE__       (  lowerCamelCase__	, lowerCamelCase__			)  ->     str:
	__lowerCamelCase				:				Optional[int]					       = [[] for _ in range(__snake_case			)]
	__lowerCamelCase				:				List[str]					       = key - 1

	if key <= 0:
		raise ValueError('Height of grid can\'t be 0 or negative'			)
	if key == 1 or len(__snake_case			) <= key:
		return input_string

	for position, character in enumerate(__snake_case			):
		__lowerCamelCase				:				Tuple					       = position % (lowest * 2)  # puts it in bounds
		__lowerCamelCase				:				List[Any]					       = min(__snake_case	, lowest * 2 - num			)  # creates zigzag pattern
		temp_grid[num].append(__snake_case			)
	__lowerCamelCase				:				Optional[int]					       = [''.join(__snake_case			) for row in temp_grid]
	__lowerCamelCase				:				List[str]					       = ''.join(__snake_case			)

	return output_string






def    SCREAMING_SNAKE_CASE__       (  lowerCamelCase__	, lowerCamelCase__			)  ->     str:
	__lowerCamelCase				:				Optional[Any]					       = []
	__lowerCamelCase				:				Any					       = key - 1

	if key <= 0:
		raise ValueError('Height of grid can\'t be 0 or negative'			)
	if key == 1:
		return input_string

	__lowerCamelCase				:				Dict					       = [[] for _ in range(__snake_case			)]  # generates template
	for position in range(len(__snake_case			)			):
		__lowerCamelCase				:				Tuple					       = position % (lowest * 2)  # puts it in bounds
		__lowerCamelCase				:				Optional[Any]					       = min(__snake_case	, lowest * 2 - num			)  # creates zigzag pattern
		temp_grid[num].append('*'			)

	__lowerCamelCase				:				Optional[int]					       = 0
	for row in temp_grid:  # fills in the characters
		__lowerCamelCase				:				List[Any]					       = input_string[counter : counter + len(__snake_case			)]
		grid.append(list(__snake_case			)			)
		counter += len(__snake_case			)

	__lowerCamelCase				:				Any					       = ''  # reads as zigzag
	for position in range(len(__snake_case			)			):
		__lowerCamelCase				:				Optional[int]					       = position % (lowest * 2)  # puts it in bounds
		__lowerCamelCase				:				Tuple					       = min(__snake_case	, lowest * 2 - num			)  # creates zigzag pattern
		output_string += grid[num][0]
		grid[num].pop(0			)
	return output_string






def    SCREAMING_SNAKE_CASE__       (  lowerCamelCase__			)  ->     dict[int, str]:
	__lowerCamelCase				:				Union[str, Any]					       = {}
	for key_guess in range(1	, len(__snake_case			)			):  # tries every key
		__lowerCamelCase				:				List[Any]					       = decrypt(__snake_case	, __snake_case			)
	return results


if __name__ == "__main__":
					import doctest

					doctest.testmod()








UpperCAmelCase__   	=							{
    '''A''': '''.-''', '''B''': '''-...''', '''C''': '''-.-.''', '''D''': '''-..''', '''E''': '''.''', '''F''': '''..-.''', '''G''': '''--.''',
    '''H''': '''....''', '''I''': '''..''', '''J''': '''.---''', '''K''': '''-.-''', '''L''': '''.-..''', '''M''': '''--''', '''N''': '''-.''',
    '''O''': '''---''', '''P''': '''.--.''', '''Q''': '''--.-''', '''R''': '''.-.''', '''S''': '''...''', '''T''': '''-''', '''U''': '''..-''',
    '''V''': '''...-''', '''W''': '''.--''', '''X''': '''-..-''', '''Y''': '''-.--''', '''Z''': '''--..''', '''1''': '''.----''',
    '''2''': '''..---''', '''3''': '''...--''', '''4''': '''....-''', '''5''': '''.....''', '''6''': '''-....''', '''7''': '''--...''',
    '''8''': '''---..''', '''9''': '''----.''', '''0''': '''-----''', '''&''': '''.-...''', '''@''': '''.--.-.''',
    ''':''': '''---...''', ''',''': '''--..--''', '''.''': '''.-.-.-''', '''\'''': '''.----.''', '''"''': '''.-..-.''',
    '''?''': '''..--..''', '''/''': '''-..-.''', '''=''': '''-...-''', '''+''': '''.-.-.''', '''-''': '''-....-''',
    '''(''': '''-.--.''', ''')''': '''-.--.-''', '''!''': '''-.-.--''', ''' ''': '''/'''
}  # Exclamation mark is not in ITU-R recommendation
# fmt: on
UpperCAmelCase__   	=							{value: key for key, value in MORSE_CODE_DICT.items()}
def 				UpperCAmelCase_					(							__snake_case						)     ->			str:







 """simple docstring"""


 return " ".join(MORSE_CODE_DICT[char] for char in message.upper()						)
def 				UpperCAmelCase_					(							__snake_case						)     ->			str:







 """simple docstring"""


 return "".join(REVERSE_DICT[char] for char in message.split()						)
def 				UpperCAmelCase_					(							)     ->			None:







 """simple docstring"""


 _lowercase							      ='''Morse code here!'''
 print(__snake_case						)
 _lowercase							      =encrypt(__snake_case						)
 print(__snake_case						)
 _lowercase							      =decrypt(__snake_case						)
 print(__snake_case						)


if __name__ == "__main__":
  main()

