




'''simple docstring'''




import re





def      a_							(      __snake_case							:			str   )							->						str:



       """simple docstring"""

       if len(re.findall('''[ATCG]'''   ,       __snake_case   )   ) != len(__snake_case   ):
              raise ValueError('''Invalid Strand'''   )

       return dna.translate(dna.maketrans('''ATCG'''   ,       '''TAGC'''   )   )


if __name__ == "__main__":
     import doctest

     doctest.testmod()











def _a				(	lowerCamelCase:   dict )	->						bool:







      '''simple docstring'''






      __A          =				set()
      # To detect a back edge, keep track of vertices currently in the recursion stack
      __A          =				set()
      return any(
          node not in visited and depth_first_search(lowerCamelCase					,				lowerCamelCase					,				lowerCamelCase					,				lowerCamelCase )
          for node in graph )



def _a				(	lowerCamelCase:   dict					,				lowerCamelCase:   int					,				lowerCamelCase:   set					,				lowerCamelCase:   set )	->						bool:







      '''simple docstring'''






      visited.add(lowerCamelCase )
      rec_stk.add(lowerCamelCase )

      for node in graph[vertex]:
            if node not in visited:
                  if depth_first_search(lowerCamelCase					,				lowerCamelCase					,				lowerCamelCase					,				lowerCamelCase ):
                        return True
            elif node in rec_stk:
                  return True

    # The node needs to be removed from recursion stack before function ends
      rec_stk.remove(lowerCamelCase )
      return False


if __name__ == "__main__":
       from doctest import testmod

       testmod()





