




"""simple docstring"""




a_            =   {0: [1, 2], 1: [0, 3], 2: [0], 3: [1], 4: [5, 6], 5: [4, 6], 6: [4, 5]}

a_            =   {0: [1, 2, 3], 1: [0, 3], 2: [0], 3: [0, 1], 4: [], 5: []}







def       __UpperCAmelCase      (				__UpperCamelCase					,							__UpperCamelCase					,							__UpperCamelCase					):
			__lowercase	:       str				=   True
			__lowercase	:       Optional[int]				=   []

			for neighbour in graph[vert]:
						if not visited[neighbour]:
									connected_verts += dfs(__UpperCamelCase					,							__UpperCamelCase					,							__UpperCamelCase					)

			return [vert, *connected_verts]







def       __UpperCAmelCase      (				__UpperCamelCase					):
			__lowercase	:       Tuple				=   len(__UpperCamelCase					)
			__lowercase	:       Optional[int]				=   graph_size * [False]
			__lowercase	:       Dict				=   []

			for i in range(__UpperCamelCase					):
						if not visited[i]:
									__lowercase	:       Any				=   dfs(__UpperCamelCase					,							__UpperCamelCase					,							__UpperCamelCase					)
									components_list.append(__UpperCamelCase					)

			return components_list


if __name__ == "__main__":
			import doctest

			doctest.testmod()









"""simple docstring"""




from collections import defaultdict







def       __UpperCAmelCase      (				__UpperCamelCase					):
			__lowercase	:       defaultdict[str, int]				=   defaultdict(__UpperCamelCase					)
			# Creating a dictionary containing count of each word
			for word in sentence.split():
						occurrence[word] += 1
			return occurrence


if __name__ == "__main__":
			for word, count in word_occurrence('INPUT STRING').items():
						print(F"{word}: {count}")



