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

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

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.s: F = None
        self.v: E = None
        self.x: E = None
        self.z: E = None
        self.q: G = None
        self.w: C = None
        self.o: C = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.t: C = None
        self.u: G = None
        self.r: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.o: A = None
        self.r: F = None
        self.z: C = None
        self.w: C = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.s: F = None
        self.v: E = None
        self.x: E = None
        self.z: E = None
        self.q: G = None
        self.w: C = None
        self.o: C = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.t: C = None
        self.u: G = None
        self.r: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.o: A = None
        self.r: F = None
        self.z: C = None
        self.w: C = None
        self.txt = txt

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

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

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