class A:
    def __init__(self, txt: str):
        self.x: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.p: G = None
        self.t: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.r: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: G = None
        self.r: E = None
        self.z: F = None
        self.o: F = None
        self.txt = txt

n = A("n")
g = B("g")
c = C("c")
b = D("b")
l = E("l")
i = F("i")
m = G("m")
h = H("h")
a = D("a")
d = G("d")

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

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.p: G = None
        self.t: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.r: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: G = None
        self.r: E = None
        self.z: F = None
        self.o: F = None
        self.txt = txt

n = A("n")
g = B("g")
c = C("c")
b = D("b")
l = E("l")
i = F("i")
m = G("m")
h = H("h")
a = D("a")
d = G("d")

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