


import numpy as np

__lowerCamelCase   	=  [
    ['''a''', '''b''', '''c''', '''d''', '''e'''],
    ['''f''', '''g''', '''h''', '''i''', '''k'''],
    ['''l''', '''m''', '''n''', '''o''', '''p'''],
    ['''q''', '''r''', '''s''', '''t''', '''u'''],
    ['''v''', '''w''', '''x''', '''y''', '''z'''],
]


class 	a__						:

       def __init__( self   :  Optional[Any]     ):
            a_     :  Dict				      =     np.array(lowerCamelCase_     )

       def     UpperCAmelCase( self   :  Optional[Any]   ,				lowerCamelCase_   :  str     ):
            a_      ,      a_     :  Dict				      =     np.where(letter == self.SQUARE     )
            a_     :  Optional[Any]				      =     np.concatenate([indexa + 1, indexa + 1]     )
            return indexes

       def     UpperCAmelCase( self   :  str   ,				lowerCamelCase_   :  int   ,				lowerCamelCase_   :  int     ):
            return self.SQUARE[indexa - 1, indexa - 1]

       def     UpperCAmelCase( self   :  Tuple   ,				lowerCamelCase_   :  str     ):
            a_     :  Dict				      =     message.lower()
            a_     :  Any				      =     message.replace("""j"""   ,				"""i"""     )

            a_     :  Any				      =     """"""
            for letter_index in range(len(lowerCamelCase_     )     ):
                 if message[letter_index] != " ":
                      a_     :  List[Any]				      =     self.letter_to_numbers(message[letter_index]     )
                      a_     :  Union[str, Any]				      =     encoded_message + str(numbers[0]     ) + str(numbers[1]     )
                 elif message[letter_index] == " ":
                      a_     :  Union[str, Any]				      =     encoded_message + """ """

            return encoded_message

       def     UpperCAmelCase( self   :  Tuple   ,				lowerCamelCase_   :  str     ):
            a_     :  Dict				      =     message.replace(""" """   ,				"""  """     )
            a_     :  Dict				      =     """"""
            for numbers_index in range(int(len(lowerCamelCase_     ) / 2     )     ):
                 if message[numbers_index * 2] != " ":
                      a_     :  Dict				      =     message[numbers_index * 2]
                      a_     :  Optional[int]				      =     message[numbers_index * 2 + 1]

                      a_     :  List[str]				      =     self.numbers_to_letter(int(lowerCamelCase_     )   ,				int(lowerCamelCase_     )     )
                      a_     :  str				      =     decoded_message + letter
                 elif message[numbers_index * 2] == " ":
                      a_     :  Optional[int]				      =     decoded_message + """ """

            return decoded_message







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

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



def 			_a      (    __UpperCamelCase	,	__UpperCamelCase	,	__UpperCamelCase			):
     a_     :  Tuple				      =     True
     a_     :  Optional[Any]				      =     []

     for neighbour in graph[vert]:
          if not visited[neighbour]:
               connected_verts += dfs(__UpperCamelCase	,	__UpperCamelCase	,	__UpperCamelCase			)

     return [vert, *connected_verts]



def 			_a      (    __UpperCamelCase			):
     a_     :  Dict				      =     len(__UpperCamelCase			)
     a_     :  List[str]				      =     graph_size * [False]
     a_     :  Dict				      =     []

     for i in range(__UpperCamelCase			):
          if not visited[i]:
               a_     :  str				      =     dfs(__UpperCamelCase	,	__UpperCamelCase	,	__UpperCamelCase			)
               components_list.append(__UpperCamelCase			)

     return components_list


if __name__ == "__main__":
       import doctest

       doctest.testmod()



