class A:
    def __init__(self, txt: str):
        self.z: A = None
        self.v: D = None
        self.x: A = None
        self.u: C = None
        self.r: C = None
        self.w: A = None
        self.y: A = None
        self.t: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: A = None
        self.v: E = None
        self.u: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: G = None
        self.o: B = None
        self.y: A = None
        self.u: A = None
        self.t: F = None
        self.x: E = None
        self.r: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: G = None
        self.s: B = None
        self.y: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: F = None
        self.q: F = None
        self.t: D = None
        self.x: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: E = None
        self.r: G = None
        self.y: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: A = None
        self.v: E = None
        self.u: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: G = None
        self.o: B = None
        self.y: A = None
        self.u: A = None
        self.t: F = None
        self.x: E = None
        self.r: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: G = None
        self.s: B = None
        self.y: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: F = None
        self.q: F = None
        self.t: D = None
        self.x: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: E = None
        self.r: G = None
        self.y: B = None
        self.txt = txt

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

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