class A:
    def __init__(self, txt: str):
        self.s: D = None
        self.z: F = None
        self.p: H = None
        self.v: I = None
        self.x: I = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: D = None
        self.p: B = None
        self.u: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.z: E = None
        self.r: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.q: A = None
        self.v: B = None
        self.o: B = None
        self.p: F = None
        self.s: H = None
        self.w: D = None
        self.t: I = None
        self.u: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: D = None
        self.v: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: D = None
        self.o: D = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: D = None
        self.p: B = None
        self.u: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.z: E = None
        self.r: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.q: A = None
        self.v: B = None
        self.o: B = None
        self.p: F = None
        self.s: H = None
        self.w: D = None
        self.t: I = None
        self.u: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: D = None
        self.v: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: D = None
        self.o: D = None
        self.txt = txt

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

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