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

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

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: H = None
        self.u: A = None
        self.s: B = None
        self.w: H = None
        self.y: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: I = None
        self.v: D = None
        self.u: B = None
        self.txt = txt

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

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

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

k = A("k")
l = B("l")
g = C("g")
i = D("i")
m = E("m")
j = F("j")
c = G("c")
f = H("f")
h = I("h")
n = H("n")

k.u = l
l.z = m
l.o = f
l.r = n
l.y = n
l.x = i
l.w = c
g.p = l
i.x = n
i.w = n
i.u = k
i.s = l
i.y = l
m.s = l
j.p = h
j.v = i
j.u = l
c.x = m
f.q = l
f.p = g
f.z = g
f.o = c
h.v = m
h.t = m
h.x = m
h.s = j
h.z = c
h.y = l
n.q = l
n.p = g
n.z = g
n.o = c
assert h.y.z.s.z.s.o.q.z.txt == "
class A:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: H = None
        self.u: A = None
        self.s: B = None
        self.w: H = None
        self.y: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: I = None
        self.v: D = None
        self.u: B = None
        self.txt = txt

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

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

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

k = A("k")
l = B("l")
g = C("g")
i = D("i")
m = E("m")
j = F("j")
c = G("c")
f = H("f")
h = I("h")
n = H("n")

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