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

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.p: D = None
        self.w: E = None
        self.r: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.q: B = None
        self.s: A = None
        self.u: A = None
        self.r: C = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.r: B = None
        self.s: D = None
        self.q: A = None
        self.w: A = None
        self.txt = txt

k = A("k")
j = B("j")
a = C("a")
c = D("c")
m = E("m")
d = C("d")
h = E("h")
i = B("i")
e = E("e")
n = A("n")

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

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.p: D = None
        self.w: E = None
        self.r: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.q: B = None
        self.s: A = None
        self.u: A = None
        self.r: C = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.r: B = None
        self.s: D = None
        self.q: A = None
        self.w: A = None
        self.txt = txt

k = A("k")
j = B("j")
a = C("a")
c = D("c")
m = E("m")
d = C("d")
h = E("h")
i = B("i")
e = E("e")
n = A("n")

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