class A:
    def __init__(self, txt: str):
        self.y: A = None
        self.s: A = None
        self.o: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.z: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

e = A("e")
i = B("i")
k = C("k")
m = D("m")
l = B("l")
g = A("g")
a = C("a")
b = B("b")
n = A("n")

e.y = g
e.s = g
e.o = k
i.x = l
k.v = m
k.z = g
m.o = b
l.x = b
g.y = e
g.s = e
g.o = k
a.v = m
a.z = e
b.x = l
n.y = g
n.s = g
n.o = a
assert m.o.x.x.x.x.x.x.x.txt == "
class A:
    def __init__(self, txt: str):
        self.y: A = None
        self.s: A = None
        self.o: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.z: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

e = A("e")
i = B("i")
k = C("k")
m = D("m")
l = B("l")
g = A("g")
a = C("a")
b = B("b")
n = A("n")

e.y = g
e.s = g
e.o = k
i.x = l
k.v = m
k.z = g
m.o = b
l.x = b
g.y = e
g.s = e
g.o = k
a.v = m
a.z = e
b.x = l
n.y = g
n.s = g
n.o = a
assert m.o.x.x.x.x.x.x.x.txt == "l"