class A:
    def __init__(self, txt: str):
        self.z: I = None
        self.x: E = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.p: G = None
        self.w: E = None
        self.t: A = None
        self.q: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: C = None
        self.q: B = None
        self.w: G = None
        self.y: H = None
        self.z: I = None
        self.t: G = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.o: E = None
        self.v: A = None
        self.x: H = None
        self.t: A = None
        self.y: C = None
        self.p: G = None
        self.s: D = None
        self.r: D = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.p: G = None
        self.w: E = None
        self.t: A = None
        self.q: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: C = None
        self.q: B = None
        self.w: G = None
        self.y: H = None
        self.z: I = None
        self.t: G = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.o: E = None
        self.v: A = None
        self.x: H = None
        self.t: A = None
        self.y: C = None
        self.p: G = None
        self.s: D = None
        self.r: D = None
        self.txt = txt

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

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