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

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.y: E = None
        self.v: E = None
        self.t: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: A = None
        self.o: D = None
        self.w: G = None
        self.s: F = None
        self.v: A = None
        self.r: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: G = None
        self.s: A = None
        self.x: G = None
        self.y: G = None
        self.q: G = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.s: D = None
        self.o: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.y: E = None
        self.v: E = None
        self.t: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: A = None
        self.o: D = None
        self.w: G = None
        self.s: F = None
        self.v: A = None
        self.r: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: G = None
        self.s: A = None
        self.x: G = None
        self.y: G = None
        self.q: G = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.s: D = None
        self.o: E = None
        self.txt = txt

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

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