



from collections import deque


def A    (							__UpperCamelCase       )    ->   List[Any]:
			A__	  =     len(__UpperCamelCase       )
			A__	  =     deque()
			A__	  =     [False for _ in range(__UpperCamelCase       )]
			A__	  =     [-1 for _ in range(__UpperCamelCase       )]
			A__	  =     index_of[:]

			def strong_connect(__UpperCamelCase			,						__UpperCamelCase			,						__UpperCamelCase       ):
						A__	  =     index  # the number when this node is seen
						A__	  =     index  # lowest rank node reachable from here
						index += 1
						stack.append(__UpperCamelCase       )
						A__	  =     True

						for w in g[v]:
									if index_of[w] == -1:
												A__	  =     strong_connect(__UpperCamelCase			,						__UpperCamelCase			,						__UpperCamelCase       )
												A__	  =     (
												    lowlink_of[w] if lowlink_of[w] < lowlink_of[v] else lowlink_of[v]
												)
									elif on_stack[w]:
												A__	  =     (
												    lowlink_of[w] if lowlink_of[w] < lowlink_of[v] else lowlink_of[v]
												)

						if lowlink_of[v] == index_of[v]:
									A__	  =     []
									A__	  =     stack.pop()
									A__	  =     False
									component.append(__UpperCamelCase       )
									while w != v:
												A__	  =     stack.pop()
												A__	  =     False
												component.append(__UpperCamelCase       )
									components.append(__UpperCamelCase       )
						return index

			A__	  =     []
			for v in range(__UpperCamelCase       ):
						if index_of[v] == -1:
									strong_connect(__UpperCamelCase			,						0			,						__UpperCamelCase       )

			return components


def A    (							__UpperCamelCase			,						__UpperCamelCase       )    ->   List[Any]:
			A__	  =     [[] for _ in range(__UpperCamelCase       )]
			for u, v in edges:
						g[u].append(__UpperCamelCase       )
			return g


if __name__ == "__main__":
							# Test
							SCREAMING_SNAKE_CASE__   			=   7
							SCREAMING_SNAKE_CASE__   			=   [0, 0, 1, 2, 3, 3, 4, 4, 6]
							SCREAMING_SNAKE_CASE__   			=   [1, 3, 2, 0, 1, 4, 5, 6, 5]
							SCREAMING_SNAKE_CASE__   			=   [(u, v) for u, v in zip(source, target)]
							SCREAMING_SNAKE_CASE__   			=   create_graph(n_vertices, edges)

							assert [[5], [6], [4], [3, 2, 1, 0]] == tarjan(g)









from __future__ import annotations

from fractions import Fraction


def A    (							__UpperCamelCase			,						__UpperCamelCase       )    ->   bool:
			return (
			    num != den and num % 10 == den // 10 and (num // 10) / (den % 10) == num / den
			)


def A    (							__UpperCamelCase       )    ->   list[str]:
			A__	  =     []
			A__	  =     11
			A__	  =     int('1' + '0' * digit_len       )
			for num in range(__UpperCamelCase			,						__UpperCamelCase       ):
						while den <= 99:
									if (num != den) and (num % 10 == den // 10) and (den % 10 != 0):
												if is_digit_cancelling(__UpperCamelCase			,						__UpperCamelCase       ):
															solutions.append(f'''{num}/{den}'''       )
									den += 1
						num += 1
						A__	  =     10
			return solutions


def A    (							__UpperCamelCase = 2       )    ->   int:
			A__	  =     1.0
			for fraction in fraction_list(__UpperCamelCase       ):
						A__	  =     Fraction(__UpperCamelCase       )
						result *= frac.denominator / frac.numerator
			return int(__UpperCamelCase       )


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




