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

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.r: I = None
        self.x: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: F = None
        self.s: I = None
        self.o: F = None
        self.t: D = None
        self.y: D = None
        self.v: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.q: B = None
        self.x: G = None
        self.t: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.o: D = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.r: I = None
        self.x: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: F = None
        self.s: I = None
        self.o: F = None
        self.t: D = None
        self.y: D = None
        self.v: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.q: B = None
        self.x: G = None
        self.t: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.o: D = None
        self.txt = txt

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

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

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

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