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

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.r: B = None
        self.q: A = None
        self.p: B = None
        self.u: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.q: C = None
        self.t: B = None
        self.txt = txt

d = A("d")
l = B("l")
j = C("j")
e = D("e")
b = E("b")
g = E("g")
a = C("a")
m = E("m")
n = B("n")

d.z = e
l.v = a
l.r = n
l.p = n
l.q = d
l.u = g
j.v = l
j.o = e
e.w = a
e.s = j
e.t = n
b.u = a
b.q = a
b.t = l
g.u = a
g.q = j
g.t = l
a.v = l
a.o = e
m.u = j
m.q = a
m.t = n
n.v = j
n.r = l
n.p = l
n.q = d
n.u = b
assert d.z.t.u.txt == "
class A:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.r: B = None
        self.q: A = None
        self.p: B = None
        self.u: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.q: C = None
        self.t: B = None
        self.txt = txt

d = A("d")
l = B("l")
j = C("j")
e = D("e")
b = E("b")
g = E("g")
a = C("a")
m = E("m")
n = B("n")

d.z = e
l.v = a
l.r = n
l.p = n
l.q = d
l.u = g
j.v = l
j.o = e
e.w = a
e.s = j
e.t = n
b.u = a
b.q = a
b.t = l
g.u = a
g.q = j
g.t = l
a.v = l
a.o = e
m.u = j
m.q = a
m.t = n
n.v = j
n.r = l
n.p = l
n.q = d
n.u = b
assert d.z.t.u.txt == "b"