



def 					__lowerCAmelCase		(  __lowerCamelCase	:    list[int]				,   __lowerCamelCase	:    list[int]				,   __lowerCamelCase	:    int	)  ->						bool:
					return not any(
					    neighbour == 1 and colored_vertices[i] == color
					    for i, neighbour in enumerate(__lowerCamelCase	)	)






def 					__lowerCAmelCase		(  __lowerCamelCase	:    list[list[int]]				,   __lowerCamelCase	:    int				,   __lowerCamelCase	:    list[int]				,   __lowerCamelCase	:    int	)  ->						bool:

					# Base Case
					if index == len(__lowerCamelCase	):
										return True

					# Recursive Step
					for i in range(__lowerCamelCase	):
										if valid_coloring(graph[index]				,   __lowerCamelCase				,   __lowerCamelCase	):
															# Color current vertex
															__lowerCAmelCase	   =i
															# Validate coloring
															if util_color(__lowerCamelCase				,   __lowerCamelCase				,   __lowerCamelCase				,   index + 1	):
																				return True
															# Backtrack
															__lowerCAmelCase	   =-1
					return False






def 					__lowerCAmelCase		(  __lowerCamelCase	:    list[list[int]]				,   __lowerCamelCase	:    int	)  ->						list[int]:
					__lowerCAmelCase	   =[-1] * len(__lowerCamelCase	)

					if util_color(__lowerCamelCase				,   __lowerCamelCase				,   __lowerCamelCase				,   0	):
										return colored_vertices

					return []









import os
from typing import Dict, List, Tuple, TypeVar, Union


lowercase_	       =			TypeVar('''T''')

lowercase_	       =			Union[List[T], Tuple[T, ...]]
lowercase_	       =			Union[T, List[T], Dict[str, T]]
lowercase_	       =			Union[str, bytes, os.PathLike]




