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

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

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

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

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

n = A("n")
g = B("g")
b = C("b")
a = D("a")
e = E("e")
k = C("k")
m = E("m")
j = E("j")
i = B("i")
f = E("f")

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

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

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

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

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

n = A("n")
g = B("g")
b = C("b")
a = D("a")
e = E("e")
k = C("k")
m = E("m")
j = E("j")
i = B("i")
f = E("f")

n.o = k
n.x = k
n.t = e
n.u = e
g.t = a
g.z = e
g.q = b
b.z = a
a.z = g
a.q = g
a.p = f
e.q = b
e.y = b
e.s = a
e.u = m
k.z = a
m.q = k
m.y = k
m.s = a
m.u = f
j.q = k
j.y = k
j.s = a
j.u = f
i.t = a
i.z = j
i.q = b
f.q = k
f.y = k
f.s = a
f.u = j
assert n.t.q.z.p.s.q.t.z.txt == "g"