def sameList(a, b):
    """Find out if two nodes are in the same circularly linked list"""
    if a is None or b is None:
        return False
    if a is b:
        return True

    curra = a

    while curra.next is not a:
        if curra is b:
            return True
        curra = curra.next
    return False