


"""simple docstring"""







from collections import deque
from math import floor
from random import random
from time import time






class       __A				:






 """simple docstring"""




 def __init__(		self						)					->     Tuple:
     a 		={}


 def       SCREAMING_SNAKE_CASE							(		self ,    __A ,    __A ,    __A=1						)					->     Union[str, Any]:
     if self.graph.get(__A						):
         if self.graph[u].count([w, v]						) == 0:
             self.graph[u].append([w, v]						)
     else:
         a 		=[[w, v]]
     if not self.graph.get(__A						):
         a 		=[]


 def       SCREAMING_SNAKE_CASE							(		self						)					->     int:
     return list(self.graph						)


 def       SCREAMING_SNAKE_CASE							(		self ,    __A ,    __A						)					->     Optional[Any]:
     if self.graph.get(__A						):
         for _ in self.graph[u]:
             if _[1] == v:
                 self.graph[u].remove(__A						)


 def       SCREAMING_SNAKE_CASE							(		self ,    __A=-2 ,    __A=-1						)					->     List[Any]:
     if s == d:
         return []
     a 		=[]
     a 		=[]
     if s == -2:
         a 		=list(self.graph						)[0]
     stack.append(__A						)
     visited.append(__A						)
     a 		=s

     while True:
         # check if there is any non isolated nodes
         if len(self.graph[s]						) != 0:
             a 		=s
             for node in self.graph[s]:
                 if visited.count(node[1]						) < 1:
                     if node[1] == d:
                         visited.append(__A						)
                         return visited
                     else:
                         stack.append(node[1]						)
                         visited.append(node[1]						)
                         a 		=node[1]
                         break

            # check if all the children are visited
         if s == ss:
             stack.pop()
             if len(__A						) != 0:
                 a 		=stack[len(__A						) - 1]
         else:
             a 		=ss

         # check if se have reached the starting point
         if len(__A						) == 0:
             return visited


 def       SCREAMING_SNAKE_CASE							(		self ,    __A=-1						)					->     int:
     if c == -1:
         a 		=floor(random() * 1_0000						) + 10
     for i in range(__A						):
         # every vertex has max 100 edges
         for _ in range(floor(random() * 102						) + 1						):
             a 		=floor(random() * c						) + 1
             if n != i:
                 self.add_pair(__A ,    __A ,    1						)


 def       SCREAMING_SNAKE_CASE							(		self ,    __A=-2						)					->     List[str]:
     a 		=deque()
     a 		=[]
     if s == -2:
         a 		=list(self.graph						)[0]
     d.append(__A						)
     visited.append(__A						)
     while d:
         a 		=d.popleft()
         if len(self.graph[s]						) != 0:
             for node in self.graph[s]:
                 if visited.count(node[1]						) < 1:
                     d.append(node[1]						)
                     visited.append(node[1]						)
     return visited


 def       SCREAMING_SNAKE_CASE							(		self ,    __A						)					->     Optional[Any]:
     a 		=0
     for x in self.graph:
         for y in self.graph[x]:
             if y[1] == u:
                 count += 1
     return count


 def       SCREAMING_SNAKE_CASE							(		self ,    __A						)					->     Tuple:
     return len(self.graph[u]						)


 def       SCREAMING_SNAKE_CASE							(		self ,    __A=-2						)					->     List[Any]:
     a 		=[]
     a 		=[]
     if s == -2:
         a 		=list(self.graph						)[0]
     stack.append(__A						)
     visited.append(__A						)
     a 		=s
     a 		=[]

     while True:
         # check if there is any non isolated nodes
         if len(self.graph[s]						) != 0:
             a 		=s
             for node in self.graph[s]:
                 if visited.count(node[1]						) < 1:
                     stack.append(node[1]						)
                     visited.append(node[1]						)
                     a 		=node[1]
                     break

            # check if all the children are visited
         if s == ss:
             sorted_nodes.append(stack.pop()						)
             if len(__A						) != 0:
                 a 		=stack[len(__A						) - 1]
         else:
             a 		=ss

         # check if se have reached the starting point
         if len(__A						) == 0:
             return sorted_nodes


 def       SCREAMING_SNAKE_CASE							(		self						)					->     List[Any]:
     a 		=[]
     a 		=[]
     a 		=list(self.graph						)[0]
     stack.append(__A						)
     visited.append(__A						)
     a 		=-2
     a 		=[]
     a 		=s
     a 		=False
     a 		=set()

     while True:
         # check if there is any non isolated nodes
         if len(self.graph[s]						) != 0:
             a 		=s
             for node in self.graph[s]:
                 if (
                     visited.count(node[1]						) > 0
                     and node[1] != parent
                     and indirect_parents.count(node[1]						) > 0
                     and not on_the_way_back
                 ):
                     a 		=len(__A						) - 1
                     while len_stack >= 0:
                         if stack[len_stack] == node[1]:
                             anticipating_nodes.add(node[1]						)
                             break
                         else:
                             anticipating_nodes.add(stack[len_stack]						)
                             len_stack -= 1
                 if visited.count(node[1]						) < 1:
                     stack.append(node[1]						)
                     visited.append(node[1]						)
                     a 		=node[1]
                     break

            # check if all the children are visited
         if s == ss:
             stack.pop()
             a 		=True
             if len(__A						) != 0:
                 a 		=stack[len(__A						) - 1]
         else:
             a 		=False
             indirect_parents.append(__A						)
             a 		=s
             a 		=ss

         # check if se have reached the starting point
         if len(__A						) == 0:
             return list(__A						)


 def       SCREAMING_SNAKE_CASE							(		self						)					->     Tuple:
     a 		=[]
     a 		=[]
     a 		=list(self.graph						)[0]
     stack.append(__A						)
     visited.append(__A						)
     a 		=-2
     a 		=[]
     a 		=s
     a 		=False
     a 		=set()

     while True:
         # check if there is any non isolated nodes
         if len(self.graph[s]						) != 0:
             a 		=s
             for node in self.graph[s]:
                 if (
                     visited.count(node[1]						) > 0
                     and node[1] != parent
                     and indirect_parents.count(node[1]						) > 0
                     and not on_the_way_back
                 ):
                     a 		=len(__A						) - 1
                     while len_stack_minus_one >= 0:
                         if stack[len_stack_minus_one] == node[1]:
                             anticipating_nodes.add(node[1]						)
                             break
                         else:
                             return True
                 if visited.count(node[1]						) < 1:
                     stack.append(node[1]						)
                     visited.append(node[1]						)
                     a 		=node[1]
                     break

            # check if all the children are visited
         if s == ss:
             stack.pop()
             a 		=True
             if len(__A						) != 0:
                 a 		=stack[len(__A						) - 1]
         else:
             a 		=False
             indirect_parents.append(__A						)
             a 		=s
             a 		=ss

         # check if se have reached the starting point
         if len(__A						) == 0:
             return False


 def       SCREAMING_SNAKE_CASE							(		self ,    __A=-2 ,    __A=-1						)					->     List[str]:
     a 		=time()
     self.dfs(__A ,    __A						)
     a 		=time()
     return end - begin





 def       SCREAMING_SNAKE_CASE							(		self ,    __A=-2						)					->     int:
     a 		=time()
     self.bfs(__A						)
     a 		=time()
     return end - begin






class       __A				:






 """simple docstring"""




 def __init__(		self						)					->     List[str]:
     a 		={}


 def       SCREAMING_SNAKE_CASE							(		self ,    __A ,    __A ,    __A=1						)					->     Dict:
     # check if the u exists
     if self.graph.get(__A						):
         # if there already is a edge
         if self.graph[u].count([w, v]						) == 0:
             self.graph[u].append([w, v]						)
     else:
         # if u does not exist
         a 		=[[w, v]]
     # add the other way
     if self.graph.get(__A						):
         # if there already is a edge
         if self.graph[v].count([w, u]						) == 0:
             self.graph[v].append([w, u]						)
     else:
         # if u does not exist
         a 		=[[w, u]]


 def       SCREAMING_SNAKE_CASE							(		self ,    __A ,    __A						)					->     Any:
     if self.graph.get(__A						):
         for _ in self.graph[u]:
             if _[1] == v:
                 self.graph[u].remove(__A						)
        # the other way round
     if self.graph.get(__A						):
         for _ in self.graph[v]:
             if _[1] == u:
                 self.graph[v].remove(__A						)


 def       SCREAMING_SNAKE_CASE							(		self ,    __A=-2 ,    __A=-1						)					->     int:
     if s == d:
         return []
     a 		=[]
     a 		=[]
     if s == -2:
         a 		=list(self.graph						)[0]
     stack.append(__A						)
     visited.append(__A						)
     a 		=s

     while True:
         # check if there is any non isolated nodes
         if len(self.graph[s]						) != 0:
             a 		=s
             for node in self.graph[s]:
                 if visited.count(node[1]						) < 1:
                     if node[1] == d:
                         visited.append(__A						)
                         return visited
                     else:
                         stack.append(node[1]						)
                         visited.append(node[1]						)
                         a 		=node[1]
                         break

            # check if all the children are visited
         if s == ss:
             stack.pop()
             if len(__A						) != 0:
                 a 		=stack[len(__A						) - 1]
         else:
             a 		=ss

         # check if se have reached the starting point
         if len(__A						) == 0:
             return visited


 def       SCREAMING_SNAKE_CASE							(		self ,    __A=-1						)					->     List[Any]:
     if c == -1:
         a 		=floor(random() * 1_0000						) + 10
     for i in range(__A						):
         # every vertex has max 100 edges
         for _ in range(floor(random() * 102						) + 1						):
             a 		=floor(random() * c						) + 1
             if n != i:
                 self.add_pair(__A ,    __A ,    1						)


 def       SCREAMING_SNAKE_CASE							(		self ,    __A=-2						)					->     str:
     a 		=deque()
     a 		=[]
     if s == -2:
         a 		=list(self.graph						)[0]
     d.append(__A						)
     visited.append(__A						)
     while d:
         a 		=d.popleft()
         if len(self.graph[s]						) != 0:
             for node in self.graph[s]:
                 if visited.count(node[1]						) < 1:
                     d.append(node[1]						)
                     visited.append(node[1]						)
     return visited


 def       SCREAMING_SNAKE_CASE							(		self ,    __A						)					->     str:
     return len(self.graph[u]						)


 def       SCREAMING_SNAKE_CASE							(		self						)					->     List[Any]:
     a 		=[]
     a 		=[]
     a 		=list(self.graph						)[0]
     stack.append(__A						)
     visited.append(__A						)
     a 		=-2
     a 		=[]
     a 		=s
     a 		=False
     a 		=set()

     while True:
         # check if there is any non isolated nodes
         if len(self.graph[s]						) != 0:
             a 		=s
             for node in self.graph[s]:
                 if (
                     visited.count(node[1]						) > 0
                     and node[1] != parent
                     and indirect_parents.count(node[1]						) > 0
                     and not on_the_way_back
                 ):
                     a 		=len(__A						) - 1
                     while len_stack >= 0:
                         if stack[len_stack] == node[1]:
                             anticipating_nodes.add(node[1]						)
                             break
                         else:
                             anticipating_nodes.add(stack[len_stack]						)
                             len_stack -= 1
                 if visited.count(node[1]						) < 1:
                     stack.append(node[1]						)
                     visited.append(node[1]						)
                     a 		=node[1]
                     break

            # check if all the children are visited
         if s == ss:
             stack.pop()
             a 		=True
             if len(__A						) != 0:
                 a 		=stack[len(__A						) - 1]
         else:
             a 		=False
             indirect_parents.append(__A						)
             a 		=s
             a 		=ss

         # check if se have reached the starting point
         if len(__A						) == 0:
             return list(__A						)


 def       SCREAMING_SNAKE_CASE							(		self						)					->     Optional[Any]:
     a 		=[]
     a 		=[]
     a 		=list(self.graph						)[0]
     stack.append(__A						)
     visited.append(__A						)
     a 		=-2
     a 		=[]
     a 		=s
     a 		=False
     a 		=set()

     while True:
         # check if there is any non isolated nodes
         if len(self.graph[s]						) != 0:
             a 		=s
             for node in self.graph[s]:
                 if (
                     visited.count(node[1]						) > 0
                     and node[1] != parent
                     and indirect_parents.count(node[1]						) > 0
                     and not on_the_way_back
                 ):
                     a 		=len(__A						) - 1
                     while len_stack_minus_one >= 0:
                         if stack[len_stack_minus_one] == node[1]:
                             anticipating_nodes.add(node[1]						)
                             break
                         else:
                             return True
                 if visited.count(node[1]						) < 1:
                     stack.append(node[1]						)
                     visited.append(node[1]						)
                     a 		=node[1]
                     break

            # check if all the children are visited
         if s == ss:
             stack.pop()
             a 		=True
             if len(__A						) != 0:
                 a 		=stack[len(__A						) - 1]
         else:
             a 		=False
             indirect_parents.append(__A						)
             a 		=s
             a 		=ss

         # check if se have reached the starting point
         if len(__A						) == 0:
             return False


 def       SCREAMING_SNAKE_CASE							(		self						)					->     List[Any]:
     return list(self.graph						)


 def       SCREAMING_SNAKE_CASE							(		self ,    __A=-2 ,    __A=-1						)					->     Optional[int]:
     a 		=time()
     self.dfs(__A ,    __A						)
     a 		=time()
     return end - begin





 def       SCREAMING_SNAKE_CASE							(		self ,    __A=-2						)					->     Dict:
     a 		=time()
     self.bfs(__A						)
     a 		=time()
     return end - begin



"""simple docstring"""







__lowercase    					=      {
    """Pillow""": """Pillow<10.0.0""",
    """accelerate""": """accelerate>=0.20.3""",
    """av""": """av==9.2.0""",
    """beautifulsoup4""": """beautifulsoup4""",
    """black""": """black~=23.1""",
    """codecarbon""": """codecarbon==1.2.0""",
    """cookiecutter""": """cookiecutter==1.7.3""",
    """dataclasses""": """dataclasses""",
    """datasets""": """datasets!=2.5.0""",
    """decord""": """decord==0.6.0""",
    """deepspeed""": """deepspeed>=0.9.3""",
    """diffusers""": """diffusers""",
    """dill""": """dill<0.3.5""",
    """evaluate""": """evaluate>=0.2.0""",
    """fairscale""": """fairscale>0.3""",
    """faiss-cpu""": """faiss-cpu""",
    """fastapi""": """fastapi""",
    """filelock""": """filelock""",
    """flax""": """flax>=0.4.1,<=0.7.0""",
    """ftfy""": """ftfy""",
    """fugashi""": """fugashi>=1.0""",
    """GitPython""": """GitPython<3.1.19""",
    """hf-doc-builder""": """hf-doc-builder>=0.3.0""",
    """huggingface-hub""": """huggingface-hub>=0.14.1,<1.0""",
    """importlib_metadata""": """importlib_metadata""",
    """ipadic""": """ipadic>=1.0.0,<2.0""",
    """isort""": """isort>=5.5.4""",
    """jax""": """jax>=0.2.8,!=0.3.2,<=0.4.13""",
    """jaxlib""": """jaxlib>=0.1.65,<=0.4.13""",
    """jieba""": """jieba""",
    """kenlm""": """kenlm""",
    """keras-nlp""": """keras-nlp>=0.3.1""",
    """librosa""": """librosa""",
    """nltk""": """nltk""",
    """natten""": """natten>=0.14.6""",
    """numpy""": """numpy>=1.17""",
    """onnxconverter-common""": """onnxconverter-common""",
    """onnxruntime-tools""": """onnxruntime-tools>=1.4.2""",
    """onnxruntime""": """onnxruntime>=1.4.0""",
    """opencv-python""": """opencv-python""",
    """optuna""": """optuna""",
    """optax""": """optax>=0.0.8,<=0.1.4""",
    """packaging""": """packaging>=20.0""",
    """parameterized""": """parameterized""",
    """phonemizer""": """phonemizer""",
    """protobuf""": """protobuf""",
    """psutil""": """psutil""",
    """pyyaml""": """pyyaml>=5.1""",
    """pydantic""": """pydantic<2""",
    """pytest""": """pytest>=7.2.0""",
    """pytest-timeout""": """pytest-timeout""",
    """pytest-xdist""": """pytest-xdist""",
    """python""": """python>=3.8.0""",
    """ray[tune]""": """ray[tune]""",
    """regex""": """regex!=2019.12.17""",
    """requests""": """requests""",
    """rhoknp""": """rhoknp>=1.1.0,<1.3.1""",
    """rjieba""": """rjieba""",
    """rouge-score""": """rouge-score!=0.0.7,!=0.0.8,!=0.1,!=0.1.1""",
    """ruff""": """ruff>=0.0.241,<=0.0.259""",
    """sacrebleu""": """sacrebleu>=1.4.12,<2.0.0""",
    """sacremoses""": """sacremoses""",
    """safetensors""": """safetensors>=0.3.1""",
    """sagemaker""": """sagemaker>=2.31.0""",
    """scikit-learn""": """scikit-learn""",
    """sentencepiece""": """sentencepiece>=0.1.91,!=0.1.92""",
    """sigopt""": """sigopt""",
    """starlette""": """starlette""",
    """sudachipy""": """sudachipy>=0.6.6""",
    """sudachidict_core""": """sudachidict_core>=20220729""",
    """tensorflow-cpu""": """tensorflow-cpu>=2.6,<2.14""",
    """tensorflow""": """tensorflow>=2.6,<2.14""",
    """tensorflow-text""": """tensorflow-text<2.14""",
    """tf2onnx""": """tf2onnx""",
    """timeout-decorator""": """timeout-decorator""",
    """timm""": """timm""",
    """tokenizers""": """tokenizers>=0.11.1,!=0.11.3,<0.14""",
    """torch""": """torch>=1.9,!=1.12.0""",
    """torchaudio""": """torchaudio""",
    """torchvision""": """torchvision""",
    """pyctcdecode""": """pyctcdecode>=0.4.0""",
    """tqdm""": """tqdm>=4.27""",
    """unidic""": """unidic>=1.0.2""",
    """unidic_lite""": """unidic_lite>=1.0.7""",
    """urllib3""": """urllib3<2.0.0""",
    """uvicorn""": """uvicorn""",
}






