class A:
    def __init__(self, txt: str):
        self.x: B = None
        self.s: C = None
        self.w: D = None
        self.o: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

l = A("l")
e = B("e")
b = C("b")
a = D("a")
f = B("f")
n = D("n")
g = A("g")
j = C("j")
k = D("k")

l.x = e
l.s = b
l.w = a
l.o = k
e.u = f
b.t = a
b.s = l
b.z = f
a.s = l
f.u = e
n.s = l
g.x = f
g.s = j
g.w = n
g.o = k
j.t = a
j.s = g
j.z = e
k.s = l
assert l.s.z.u.u.u.u.u.u.u.txt == "
class A:
    def __init__(self, txt: str):
        self.x: B = None
        self.s: C = None
        self.w: D = None
        self.o: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

l = A("l")
e = B("e")
b = C("b")
a = D("a")
f = B("f")
n = D("n")
g = A("g")
j = C("j")
k = D("k")

l.x = e
l.s = b
l.w = a
l.o = k
e.u = f
b.t = a
b.s = l
b.z = f
a.s = l
f.u = e
n.s = l
g.x = f
g.s = j
g.w = n
g.o = k
j.t = a
j.s = g
j.z = e
k.s = l
assert l.s.z.u.u.u.u.u.u.u.txt == "e"