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

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.v: H = None
        self.o: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.t: G = None
        self.r: G = None
        self.w: B = None
        self.q: B = None
        self.s: H = None
        self.z: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: H = None
        self.u: B = None
        self.y: G = None
        self.o: H = None
        self.r: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: H = None
        self.t: G = None
        self.v: D = None
        self.p: C = None
        self.y: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.u: D = None
        self.w: E = None
        self.o: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.v: H = None
        self.o: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.t: G = None
        self.r: G = None
        self.w: B = None
        self.q: B = None
        self.s: H = None
        self.z: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: H = None
        self.u: B = None
        self.y: G = None
        self.o: H = None
        self.r: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: H = None
        self.t: G = None
        self.v: D = None
        self.p: C = None
        self.y: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.u: D = None
        self.w: E = None
        self.o: G = None
        self.txt = txt

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

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