"""simple docstring"""





import string

# frequency taken from https://en.wikipedia.org/wiki/Letter_frequency
_UpperCamelCase   :						List[Any]      =    {
    '''E''': 12.70,
    '''T''': 9.0_6,
    '''A''': 8.1_7,
    '''O''': 7.5_1,
    '''I''': 6.9_7,
    '''N''': 6.7_5,
    '''S''': 6.3_3,
    '''H''': 6.0_9,
    '''R''': 5.9_9,
    '''D''': 4.2_5,
    '''L''': 4.0_3,
    '''C''': 2.7_8,
    '''U''': 2.7_6,
    '''M''': 2.4_1,
    '''W''': 2.3_6,
    '''F''': 2.2_3,
    '''G''': 2.0_2,
    '''Y''': 1.9_7,
    '''P''': 1.9_3,
    '''B''': 1.2_9,
    '''V''': 0.9_8,
    '''K''': 0.7_7,
    '''J''': 0.1_5,
    '''X''': 0.1_5,
    '''Q''': 0.1_0,
    '''Z''': 0.0_7,
}
_UpperCamelCase   :						Optional[Any]      =    '''ETAOINSHRDLCUMWFGYPBVKJXQZ'''
_UpperCamelCase   :						Dict      =    '''ABCDEFGHIJKLMNOPQRSTUVWXYZ'''





def 				a_     (      _lowerCAmelCase  : str     ):





       '''simple docstring'''

       lowercase__			:		int       =	{letter: 0 for letter in string.ascii_uppercase}
       for letter in message.upper():
              if letter in LETTERS:
                     letter_count[letter] += 1

       return letter_count





def 				a_     (      _lowerCAmelCase  : tuple     ):





       '''simple docstring'''

       return x[0]





def 				a_     (      _lowerCAmelCase  : str     ):





       '''simple docstring'''

       lowercase__			:		Dict       =	get_letter_count(_lowerCamelCase     )
       lowercase__			:		dict[int, list[str]]       =	{
           freq: [] for letter, freq in letter_to_freq.items()
       }
       for letter in LETTERS:
              freq_to_letter[letter_to_freq[letter]].append(_lowerCamelCase     )

       lowercase__			:		dict[int, str]       =	{}

       for freq in freq_to_letter:
              freq_to_letter[freq].sort(key=ETAOIN.find   , reverse=_lowerCamelCase     )
              lowercase__			:		Tuple       =	"""""".join(freq_to_letter[freq]     )

       lowercase__			:		str       =	list(freq_to_letter_str.items()     )
       freq_pairs.sort(key=_lowerCamelCase   , reverse=_lowerCamelCase     )

       lowercase__			:		list[str]       =	[freq_pair[1] for freq_pair in freq_pairs]

       return "".join(_lowerCamelCase     )





def 				a_     (      _lowerCAmelCase  : str     ):





       '''simple docstring'''

       lowercase__			:		List[Any]       =	get_frequency_order(_lowerCamelCase     )
       lowercase__			:		Union[str, Any]       =	0
       for common_letter in ETAOIN[:6]:
              if common_letter in freq_order[:6]:
                     match_score += 1

       for uncommon_letter in ETAOIN[-6:]:
              if uncommon_letter in freq_order[-6:]:
                     match_score += 1

       return match_score


if __name__ == "__main__":
       import doctest

       doctest.testmod()






'''simple docstring'''




def 				lowerCAmelCase_   (	_lowerCamelCase:   int					):
		__SCREAMING_SNAKE_CASE       :		str           =		int(_lowerCamelCase					)
		if n_element < 1:
				__SCREAMING_SNAKE_CASE       :		List[str]           =		ValueError("""a should be a positive number"""					)
				raise my_error

		__SCREAMING_SNAKE_CASE       :		List[Any]           =		[1]
		__SCREAMING_SNAKE_CASE       ,						__SCREAMING_SNAKE_CASE       ,						__SCREAMING_SNAKE_CASE       :		Optional[int]           =		(0, 0, 0)
		__SCREAMING_SNAKE_CASE       :		List[str]           =		1
		while index < n_element:
				while hamming_list[i] * 2 <= hamming_list[-1]:
						i += 1
				while hamming_list[j] * 3 <= hamming_list[-1]:
						j += 1
				while hamming_list[k] * 5 <= hamming_list[-1]:
						k += 1
				hamming_list.append(
				    min(hamming_list[i] * 2       ,      hamming_list[j] * 3       ,      hamming_list[k] * 5					)					)
				index += 1
		return hamming_list


if __name__ == "__main__":
						UpperCamelCase__       :	Optional[Any]    = input('''Enter the last number (nth term) of the Hamming Number Series: ''')
						print('''Formula of Hamming Number Series => 2^i * 3^j * 5^k''')
						UpperCamelCase__       :	List[str]    = hamming(int(n))
						print('''-----------------------------------------------------''')
						print(f"The list with nth numbers is: {hamming_numbers}")
						print('''-----------------------------------------------------''')