def next(self):
    if (not self.node):
        raise StopIteration()
    node = self.node
    self.node = self.node.next
    return node
def next(self):
    if (not self.node):
        raise StopIteration()
    node = self.node
    self.node = self.node.next
    return node