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

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

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

class D:
    def __init__(self, txt: str):
        self.z: F = None
        self.o: B = None
        self.s: E = None
        self.t: D = None
        self.p: B = None
        self.txt = txt

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

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

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

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

d = A("d")
m = B("m")
a = C("a")
g = D("g")
e = E("e")
h = F("h")
l = G("l")
j = H("j")
i = D("i")

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

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

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

class D:
    def __init__(self, txt: str):
        self.z: F = None
        self.o: B = None
        self.s: E = None
        self.t: D = None
        self.p: B = None
        self.txt = txt

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

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

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

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

d = A("d")
m = B("m")
a = C("a")
g = D("g")
e = E("e")
h = F("h")
l = G("l")
j = H("j")
i = D("i")

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