






import os
import sys
from contextlib import contextmanager


# Windows only
if os.name == "nt":
				import ctypes
				import msvcrt  # noqa

				class 		_snake_case	(	ctypes.Structure       ):
							# _fields is a specific attr expected by ctypes
							_lowercase		:     Tuple        =				[('''size''', ctypes.c_int), ('''visible''', ctypes.c_byte)]






def 					lowerCamelCase__					():
			if os.name == "nt":
						SCREAMING_SNAKE_CASE							=			CursorInfo()
						SCREAMING_SNAKE_CASE							=			ctypes.windll.kernelaa.GetStdHandle(-11)
						ctypes.windll.kernelaa.GetConsoleCursorInfo(_UpperCAmelCase				,							ctypes.byref(_UpperCAmelCase))
						SCREAMING_SNAKE_CASE							=			False
						ctypes.windll.kernelaa.SetConsoleCursorInfo(_UpperCAmelCase				,							ctypes.byref(_UpperCAmelCase))
			elif os.name == "posix":
						sys.stdout.write('\033[?25l')
						sys.stdout.flush()






def 					lowerCamelCase__					():
			if os.name == "nt":
						SCREAMING_SNAKE_CASE							=			CursorInfo()
						SCREAMING_SNAKE_CASE							=			ctypes.windll.kernelaa.GetStdHandle(-11)
						ctypes.windll.kernelaa.GetConsoleCursorInfo(_UpperCAmelCase				,							ctypes.byref(_UpperCAmelCase))
						SCREAMING_SNAKE_CASE							=			True
						ctypes.windll.kernelaa.SetConsoleCursorInfo(_UpperCAmelCase				,							ctypes.byref(_UpperCAmelCase))
			elif os.name == "posix":
						sys.stdout.write('\033[?25h')
						sys.stdout.flush()







@contextmanager
def 					lowerCamelCase__					():
			try:
						hide_cursor()
						yield
			finally:
						show_cursor()





'''simple docstring'''




# A Bipartite Graph is a graph whose vertices can be divided into two independent sets,
# U and V such that every edge (u, v) either connects a vertex from U to V or a vertex
# from V to U. In other words, for every edge (u, v), either u belongs to U and v to V,
# or u belongs to V and v to U. We can also say that there is no edge that connects
# vertices of same set.






def 							snake_case__				(     _A:   Dict					)       ->      str:

		'''simple docstring'''


		lowerCAmelCase     =    [False] * len(_A					)
		lowerCAmelCase     =    [-1] * len(_A					)

		def dfs(_A:   Dict ,  _A:   Tuple					):
				lowerCAmelCase     =    True
				lowerCAmelCase     =    c
				for u in graph[v]:
						if not visited[u]:
								dfs(_A ,  1 - c					)

		for i in range(len(_A					)					):
				if not visited[i]:
						dfs(_A ,  0					)

		for i in range(len(_A					)					):
				for j in graph[i]:
						if color[i] == color[j]:
								return False

		return True


# Adjacency list of graph
__lowercase        =    {0: [1, 3], 1: [0, 2], 2: [1, 3], 3: [0, 2], 4: []}




print(check_bipartite_dfs(graph))




