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

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

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

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

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

k = A("k")
l = B("l")
h = C("h")
m = D("m")
j = E("j")
g = C("g")
b = A("b")
c = E("c")
n = D("n")
e = A("e")

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

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

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

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

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

k = A("k")
l = B("l")
h = C("h")
m = D("m")
j = E("j")
g = C("g")
b = A("b")
c = E("c")
n = D("n")
e = A("e")

k.q = m
k.y = m
k.o = j
l.w = m
l.q = m
l.y = m
l.x = b
h.z = l
h.w = b
h.x = j
h.p = m
m.t = h
m.z = l
m.o = j
m.p = n
m.s = b
j.w = m
j.r = c
j.s = b
j.u = h
j.y = l
g.z = l
g.w = k
g.x = c
g.p = n
b.q = m
b.o = c
b.y = n
c.w = m
c.r = j
c.s = e
c.u = h
c.y = l
n.t = g
n.z = l
n.o = j
n.p = m
n.s = k
e.q = m
e.o = c
e.y = n
assert l.x.y.o.w.z.q.o.u.x.txt == "j"