



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

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

def   lowerCAmelCase__						(							_SCREAMING_SNAKE_CASE       :			dict[int, list[int]]				,     _SCREAMING_SNAKE_CASE       :			int				,     _SCREAMING_SNAKE_CASE       :			list[bool]    ):
				"""simple docstring"""







				__a       =		True
				__a       =		[]

				for neighbour in graph[vert]:
								if not visited[neighbour]:
												order += topology_sort(_SCREAMING_SNAKE_CASE				,     _SCREAMING_SNAKE_CASE				,     _SCREAMING_SNAKE_CASE    )

				order.append(_SCREAMING_SNAKE_CASE    )

				return order

def   lowerCAmelCase__						(							_SCREAMING_SNAKE_CASE       :			dict[int, list[int]]				,     _SCREAMING_SNAKE_CASE       :			int				,     _SCREAMING_SNAKE_CASE       :			list[bool]    ):
				"""simple docstring"""







				__a       =		True
				__a       =		[vert]

				for neighbour in reversed_graph[vert]:
								if not visited[neighbour]:
												component += find_components(_SCREAMING_SNAKE_CASE				,     _SCREAMING_SNAKE_CASE				,     _SCREAMING_SNAKE_CASE    )

				return component

def   lowerCAmelCase__						(							_SCREAMING_SNAKE_CASE       :			dict[int, list[int]]    ):
				"""simple docstring"""







				__a       =		len(_SCREAMING_SNAKE_CASE    ) * [False]
				__a       =		{vert: [] for vert in range(len(_SCREAMING_SNAKE_CASE    )    )}

				for vert, neighbours in graph.items():
								for neighbour in neighbours:
												reversed_graph[neighbour].append(_SCREAMING_SNAKE_CASE    )

				__a       =		[]
				for i, was_visited in enumerate(_SCREAMING_SNAKE_CASE    ):
								if not was_visited:
												order += topology_sort(_SCREAMING_SNAKE_CASE				,     _SCREAMING_SNAKE_CASE				,     _SCREAMING_SNAKE_CASE    )

				__a       =		[]
				__a       =		len(_SCREAMING_SNAKE_CASE    ) * [False]

				for i in range(len(_SCREAMING_SNAKE_CASE    )    ):
								__a       =		order[len(_SCREAMING_SNAKE_CASE    ) - i - 1]
								if not visited[vert]:
												__a       =		find_components(_SCREAMING_SNAKE_CASE				,     _SCREAMING_SNAKE_CASE				,     _SCREAMING_SNAKE_CASE    )
												components_list.append(_SCREAMING_SNAKE_CASE    )

				return components_list





def   lowerCAmelCase__						(							_SCREAMING_SNAKE_CASE       :			int = 3				,     _SCREAMING_SNAKE_CASE       :			int = 7				,     _SCREAMING_SNAKE_CASE       :			int = 100_0000    ):
				"""simple docstring"""







				__a       =		0
				__a       =		1

				for current_denominator in range(1				,     limit + 1    ):
								__a       =		current_denominator * numerator // denominator
								if current_denominator % denominator == 0:
												current_numerator -= 1
								if current_numerator * max_denominator > current_denominator * max_numerator:
												__a       =		current_numerator
												__a       =		current_denominator
				return max_numerator


if __name__ == "__main__":
						print(solution(numerator=3, denominator=7, limit=100_0000))
