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

class B:
    def __init__(self, txt: str):
        self.o: E = None
        self.txt = txt

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

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

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

k = A("k")
g = B("g")
c = C("c")
a = D("a")
d = E("d")
l = E("l")
f = A("f")
j = A("j")
n = D("n")

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

class B:
    def __init__(self, txt: str):
        self.o: E = None
        self.txt = txt

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

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

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

k = A("k")
g = B("g")
c = C("c")
a = D("a")
d = E("d")
l = E("l")
f = A("f")
j = A("j")
n = D("n")

k.t = l
k.r = l
k.q = c
g.o = d
c.x = l
c.s = g
c.z = g
c.q = g
a.r = j
a.p = n
a.z = g
a.y = k
a.u = d
d.w = l
d.t = f
d.q = k
d.p = g
l.w = d
l.t = f
l.q = k
l.p = g
f.t = l
f.q = c
f.r = d
j.t = d
j.r = d
j.q = c
n.r = k
n.p = a
n.z = g
n.y = f
n.u = d
assert n.r.q.z.o.w.txt == "l"