text: # This is an input class.
  class LinkedList:
      def __init__(self, value):
          self.value = value
          self.next = None
  
  # Solution
  # O(n) time / O(1) space
  
  
  def findLoop(head):
      first = head.next
      second = head.next.next
      while first != second:
          first = first.next
          second = second.next.next
      first = head
      while first != second:
          first = first.next
          second = second.next
      return first
  