






'''simple docstring'''





def __UpperCAmelCase (			A			:	str						)  -> str:
			UpperCAmelCase_     :   Union[str, Any]       =   word.upper()
			UpperCAmelCase_     :   Union[str, Any]       =   0
			UpperCAmelCase_     :   Any       =   {}
			UpperCAmelCase_     :   Union[str, Any]       =   []

			for letter in word:
						if letter not in letter_nums:
									UpperCAmelCase_     :   Optional[Any]       =   str(A						)
									next_num += 1
						word_pattern.append(letter_nums[letter]						)
			return ".".join(A						)


if __name__ == "__main__":
						import pprint
						import time

						_UpperCamelCase		:		Any								=			time.time()
						with open('dictionary.txt') as in_file:
												_UpperCamelCase		:		Any								=			in_file.read().splitlines()

						_UpperCamelCase		:		dict								=			{}
						for word in word_list:
												_UpperCamelCase		:		Optional[Any]								=			get_word_pattern(word)
												if pattern in all_patterns:
																		all_patterns[pattern].append(word)
												else:
																		_UpperCamelCase		:		Optional[Any]								=			[word]

						with open('word_patterns.txt', 'w') as out_file:
												out_file.write(pprint.pformat(all_patterns))

						_UpperCamelCase		:		Dict								=			round(time.time() - start_time, 2)
						print(f"""Done!  {len(all_patterns):,} word patterns found in {total_time} seconds.""")
						# Done!  9,581 word patterns found in 0.58 seconds.










'''simple docstring'''





def __UpperCAmelCase (			)  -> Optional[Any]:
			UpperCAmelCase_     :   Union[str, Any]       =   1

			while True:
						if (
						    sorted(str(A						)						)
						    == sorted(str(2 * i						)						)
						    == sorted(str(3 * i						)						)
						    == sorted(str(4 * i						)						)
						    == sorted(str(5 * i						)						)
						    == sorted(str(6 * i						)						)
						):
									return i

						i += 1


if __name__ == "__main__":
						print(solution())


