

'''simple docstring'''







from __future__ import annotations
def       UpperCAmelCase__    (      UpperCAmelCase__,       UpperCAmelCase__				)			->			set[str]:
       A_					,			A_						=      set(UpperCAmelCase__				), [start]

       while stack:
              A_						=      stack.pop()
              explored.add(UpperCAmelCase__				)
              # Differences from BFS:
              # 1) pop last element instead of first one
              # 2) add adjacent elements to stack without exploring them
              for adj in reversed(graph[v]				):
                     if adj not in explored:
                            stack.append(UpperCAmelCase__				)
       return explored


__lowerCamelCase		       =    {
    '''A''': ['''B''', '''C''', '''D'''],
    '''B''': ['''A''', '''D''', '''E'''],
    '''C''': ['''A''', '''F'''],
    '''D''': ['''B''', '''D'''],
    '''E''': ['''B''', '''F'''],
    '''F''': ['''C''', '''E''', '''G'''],
    '''G''': ['''F'''],
}

if __name__ == "__main__":
      import doctest

      doctest.testmod()
      print(depth_first_search(G, '''A'''))



'''simple docstring'''







def       UpperCAmelCase__    (      UpperCAmelCase__				)			->			bool:
       return str(UpperCAmelCase__				) == str(UpperCAmelCase__				)[::-1]
def       UpperCAmelCase__    (      UpperCAmelCase__				)			->			int:
       return int(UpperCAmelCase__				) + int(str(UpperCAmelCase__				)[::-1]				)
def       UpperCAmelCase__    (      UpperCAmelCase__ = 1_00_00				)			->			int:
       A_						=      []
       for num in range(1,       UpperCAmelCase__				):
              A_						=      0
              A_						=      num
              while iterations < 50:
                     A_						=      sum_reverse(UpperCAmelCase__				)
                     iterations += 1
                     if is_palindrome(UpperCAmelCase__				):
                            break
              else:
                     lychrel_nums.append(UpperCAmelCase__				)
       return len(UpperCAmelCase__				)


if __name__ == "__main__":
      print(f"""{solution() = }""")
