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

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.z: C = None
        self.y: D = None
        self.x: I = None
        self.s: I = None
        self.o: F = None
        self.w: D = None
        self.t: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: I = None
        self.v: B = None
        self.w: E = None
        self.r: G = None
        self.u: I = None
        self.t: E = None
        self.p: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.y: G = None
        self.r: H = None
        self.p: A = None
        self.x: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.o: H = None
        self.s: E = None
        self.v: D = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.z: C = None
        self.y: D = None
        self.x: I = None
        self.s: I = None
        self.o: F = None
        self.w: D = None
        self.t: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: I = None
        self.v: B = None
        self.w: E = None
        self.r: G = None
        self.u: I = None
        self.t: E = None
        self.p: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.y: G = None
        self.r: H = None
        self.p: A = None
        self.x: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.o: H = None
        self.s: E = None
        self.v: D = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

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

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