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

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

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

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.w: B = None
        self.x: B = None
        self.s: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: H = None
        self.s: E = None
        self.w: H = None
        self.p: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: G = None
        self.x: A = None
        self.u: E = None
        self.w: H = None
        self.t: C = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.w: B = None
        self.x: B = None
        self.s: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: H = None
        self.s: E = None
        self.w: H = None
        self.p: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: G = None
        self.x: A = None
        self.u: E = None
        self.w: H = None
        self.t: C = None
        self.txt = txt

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

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

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