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

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.t: A = None
        self.v: D = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.t: A = None
        self.v: D = None
        self.txt = txt

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

j.z = n
j.x = g
j.q = f
a.x = c
a.u = f
a.t = f
a.q = g
a.p = k
c.z = h
c.o = h
c.u = j
c.w = b
k.t = j
k.z = h
k.y = f
k.u = a
f.y = c
f.t = j
f.v = b
n.z = b
n.o = b
n.u = j
n.w = k
g.x = c
g.u = f
g.t = f
g.q = a
g.p = k
b.t = j
b.z = k
b.y = f
b.u = a
h.t = j
h.z = k
h.y = f
h.u = a
assert f.t.z.o.y.v.u.x.u.z.txt == "n"