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

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

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

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.t: E = None
        self.w: E = None
        self.txt = txt

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

i = A("i")
d = B("d")
a = C("a")
c = D("c")
k = E("k")
g = E("g")
b = E("b")
j = C("j")
h = C("h")

i.x = j
i.t = h
i.s = c
i.p = a
d.u = j
a.r = c
a.z = c
a.t = k
a.u = j
a.s = d
c.o = k
c.t = b
c.w = b
k.q = c
k.z = j
g.q = c
g.z = j
b.q = c
b.z = j
j.r = c
j.z = c
j.t = b
j.u = a
j.s = d
h.r = c
h.z = c
h.t = g
h.u = a
h.s = d
assert d.u.z.o.q.txt == "
class A:
    def __init__(self, txt: str):
        self.x: C = None
        self.t: C = None
        self.s: D = None
        self.p: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.t: E = None
        self.w: E = None
        self.txt = txt

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

i = A("i")
d = B("d")
a = C("a")
c = D("c")
k = E("k")
g = E("g")
b = E("b")
j = C("j")
h = C("h")

i.x = j
i.t = h
i.s = c
i.p = a
d.u = j
a.r = c
a.z = c
a.t = k
a.u = j
a.s = d
c.o = k
c.t = b
c.w = b
k.q = c
k.z = j
g.q = c
g.z = j
b.q = c
b.z = j
j.r = c
j.z = c
j.t = b
j.u = a
j.s = d
h.r = c
h.z = c
h.t = g
h.u = a
h.s = d
assert d.u.z.o.q.txt == "c"