class A:
    def __init__(self, txt: str):
        self.s: E = None
        self.z: D = None
        self.q: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.p: G = None
        self.o: F = None
        self.s: D = None
        self.x: D = None
        self.y: E = None
        self.z: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.v: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.q: C = None
        self.r: D = None
        self.u: E = None
        self.txt = txt

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

h = A("h")
i = B("i")
n = C("n")
f = D("f")
b = E("b")
g = F("g")
k = G("k")
c = D("c")
m = A("m")
a = G("a")

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.p: G = None
        self.o: F = None
        self.s: D = None
        self.x: D = None
        self.y: E = None
        self.z: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.v: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.q: C = None
        self.r: D = None
        self.u: E = None
        self.txt = txt

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

h = A("h")
i = B("i")
n = C("n")
f = D("f")
b = E("b")
g = F("g")
k = G("k")
c = D("c")
m = A("m")
a = G("a")

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