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

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

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

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

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

e = A("e")
c = B("c")
m = C("m")
h = D("h")
f = E("f")
k = D("k")
i = E("i")

e.q = m
e.x = c
e.s = c
e.o = c
e.y = h
c.z = m
m.x = c
m.w = c
m.t = k
h.o = m
h.r = c
h.q = e
h.p = k
h.u = k
f.w = e
f.q = c
f.u = m
k.o = m
k.r = c
k.q = e
k.p = h
k.u = h
i.w = e
i.q = c
i.u = m
assert e.o.z.t.o.t.txt == "
class A:
    def __init__(self, txt: str):
        self.q: C = None
        self.x: B = None
        self.s: B = None
        self.o: B = None
        self.y: D = None
        self.txt = txt

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

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

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

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

e = A("e")
c = B("c")
m = C("m")
h = D("h")
f = E("f")
k = D("k")
i = E("i")

e.q = m
e.x = c
e.s = c
e.o = c
e.y = h
c.z = m
m.x = c
m.w = c
m.t = k
h.o = m
h.r = c
h.q = e
h.p = k
h.u = k
f.w = e
f.q = c
f.u = m
k.o = m
k.r = c
k.q = e
k.p = h
k.u = h
i.w = e
i.q = c
i.u = m
assert e.o.z.t.o.t.txt == "k"