class Point:
    def __init__(self, x, y):
        self.x = x
        self.y = y
        self.next = None
    
    def append(self, point):
        self.next = point

a = Point(2, 3)
b = Point(5, 7)
a.append(b)
print a.next.x
c = Point(10, 15)
b.append(c)
print a.next.next.x
