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

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

class C:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

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

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

j = A("j")
e = B("e")
h = C("h")
n = D("n")
i = E("i")
f = C("f")
m = D("m")

j.s = i
j.t = i
j.z = i
e.q = j
e.v = i
e.o = i
e.t = h
h.r = i
n.t = h
n.o = h
n.w = f
i.u = h
i.w = h
i.s = m
i.o = e
i.v = n
f.r = i
m.t = h
m.w = f
m.o = f
assert i.o.q.z.u.r.txt == "
class A:
    def __init__(self, txt: str):
        self.s: E = None
        self.t: E = None
        self.z: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

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

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

j = A("j")
e = B("e")
h = C("h")
n = D("n")
i = E("i")
f = C("f")
m = D("m")

j.s = i
j.t = i
j.z = i
e.q = j
e.v = i
e.o = i
e.t = h
h.r = i
n.t = h
n.o = h
n.w = f
i.u = h
i.w = h
i.s = m
i.o = e
i.v = n
f.r = i
m.t = h
m.w = f
m.o = f
assert i.o.q.z.u.r.txt == "i"