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

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

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

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.s: D = None
        self.o: I = None
        self.z: E = None
        self.t: H = None
        self.r: D = None
        self.x: D = None
        self.p: D = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.s: D = None
        self.o: I = None
        self.z: E = None
        self.t: H = None
        self.r: D = None
        self.x: D = None
        self.p: D = None
        self.txt = txt

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

c.o = b
c.w = n
c.y = d
d.x = f
d.o = n
k.w = c
k.y = f
k.s = d
k.v = d
k.t = d
k.x = b
k.r = h
k.z = h
e.r = c
e.z = c
e.q = h
e.s = f
e.p = f
e.x = d
e.o = d
e.v = b
m.u = n
m.p = k
h.s = k
h.v = k
h.t = c
h.w = f
h.r = e
h.u = e
f.x = c
f.v = d
f.q = d
g.y = m
g.s = m
g.w = d
g.u = d
g.x = f
g.r = e
g.t = k
b.s = e
b.r = e
b.x = e
b.p = e
b.o = n
b.z = m
b.t = g
n.s = e
n.r = e
n.x = e
n.p = e
n.o = b
n.z = m
n.t = g
assert n.t.x.x.y.x.x.w.txt == "n"