class A:
    def __init__(self, txt: str):
        self.z: D = None
        self.u: E = None
        self.t: F = None
        self.s: E = None
        self.v: F = None
        self.x: G = None
        self.y: E = None
        self.r: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.z: F = None
        self.w: E = None
        self.p: H = None
        self.v: D = None
        self.o: H = None
        self.s: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.y: A = None
        self.o: F = None
        self.q: B = None
        self.t: A = None
        self.s: A = None
        self.z: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: E = None
        self.u: D = None
        self.o: A = None
        self.x: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: D = None
        self.r: D = None
        self.o: H = None
        self.t: D = None
        self.x: F = None
        self.s: G = None
        self.u: D = None
        self.txt = txt

n = A("n")
d = B("d")
c = C("c")
e = D("e")
l = E("l")
m = F("m")
j = G("j")
f = H("f")
h = H("h")

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

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

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.z: F = None
        self.w: E = None
        self.p: H = None
        self.v: D = None
        self.o: H = None
        self.s: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.y: A = None
        self.o: F = None
        self.q: B = None
        self.t: A = None
        self.s: A = None
        self.z: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: E = None
        self.u: D = None
        self.o: A = None
        self.x: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: D = None
        self.r: D = None
        self.o: H = None
        self.t: D = None
        self.x: F = None
        self.s: G = None
        self.u: D = None
        self.txt = txt

n = A("n")
d = B("d")
c = C("c")
e = D("e")
l = E("l")
m = F("m")
j = G("j")
f = H("f")
h = H("h")

n.z = e
n.u = l
n.s = l
n.y = l
n.r = l
n.t = m
n.v = m
n.x = j
d.s = j
d.q = e
c.r = d
c.z = m
c.w = l
c.p = h
c.o = h
c.v = e
c.s = n
e.u = d
e.q = d
e.y = n
e.t = n
e.s = n
e.o = m
e.z = c
l.x = d
m.q = j
j.w = l
j.u = e
j.o = n
j.x = n
f.v = e
f.r = e
f.t = e
f.u = e
f.o = h
f.x = m
f.s = j
h.v = e
h.r = e
h.t = e
h.u = e
h.o = f
h.x = m
h.s = j
assert f.t.q.s.w.x.s.x.v.txt == "m"