class A:
    def __init__(self, txt: str):
        self.z: H = None
        self.y: G = None
        self.r: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.s: D = None
        self.y: G = None
        self.x: E = None
        self.r: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.w: H = None
        self.t: B = None
        self.z: G = None
        self.x: D = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: G = None
        self.p: B = None
        self.x: A = None
        self.s: G = None
        self.w: A = None
        self.y: A = None
        self.t: A = None
        self.o: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.u: F = None
        self.q: C = None
        self.s: D = None
        self.t: H = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.s: D = None
        self.y: G = None
        self.x: E = None
        self.r: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.w: H = None
        self.t: B = None
        self.z: G = None
        self.x: D = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: G = None
        self.p: B = None
        self.x: A = None
        self.s: G = None
        self.w: A = None
        self.y: A = None
        self.t: A = None
        self.o: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.u: F = None
        self.q: C = None
        self.s: D = None
        self.t: H = None
        self.txt = txt

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

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

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