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

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.x: E = None
        self.o: I = None
        self.z: E = None
        self.p: D = None
        self.q: E = None
        self.r: G = None
        self.w: A = None
        self.s: C = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.x: F = None
        self.w: B = None
        self.o: D = None
        self.y: F = None
        self.r: G = None
        self.z: G = None
        self.t: C = None
        self.p: B = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.x: E = None
        self.o: I = None
        self.z: E = None
        self.p: D = None
        self.q: E = None
        self.r: G = None
        self.w: A = None
        self.s: C = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.x: F = None
        self.w: B = None
        self.o: D = None
        self.y: F = None
        self.r: G = None
        self.z: G = None
        self.t: C = None
        self.p: B = None
        self.txt = txt

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

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