class A:
    def __init__(self, txt: str):
        self.z: F = None
        self.t: D = None
        self.o: B = None
        self.s: F = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.w: E = None
        self.x: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.t: H = None
        self.y: A = None
        self.v: B = None
        self.q: A = None
        self.z: E = None
        self.w: H = None
        self.p: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: H = None
        self.z: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: E = None
        self.u: D = None
        self.s: C = None
        self.p: G = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.w: E = None
        self.x: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.t: H = None
        self.y: A = None
        self.v: B = None
        self.q: A = None
        self.z: E = None
        self.w: H = None
        self.p: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: H = None
        self.z: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: E = None
        self.u: D = None
        self.s: C = None
        self.p: G = None
        self.txt = txt

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

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

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