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

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

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

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.y: C = None
        self.x: E = None
        self.p: C = None
        self.w: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: D = None
        self.q: D = None
        self.y: D = None
        self.v: B = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.y: C = None
        self.x: E = None
        self.p: C = None
        self.w: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: D = None
        self.q: D = None
        self.y: D = None
        self.v: B = None
        self.txt = txt

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

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