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

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

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

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

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

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

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

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

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

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

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

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

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