class A:
    def __init__(self, txt: str):
        self.z: H = None
        self.p: D = None
        self.t: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: H = None
        self.t: E = None
        self.y: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: I = None
        self.p: G = None
        self.w: B = None
        self.t: I = None
        self.x: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.v: C = None
        self.x: E = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: H = None
        self.t: E = None
        self.y: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: I = None
        self.p: G = None
        self.w: B = None
        self.t: I = None
        self.x: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.v: C = None
        self.x: E = None
        self.txt = txt

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

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

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

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