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

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.t: D = None
        self.s: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.x: I = None
        self.p: E = None
        self.w: H = None
        self.t: A = None
        self.o: A = None
        self.z: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.v: I = None
        self.u: D = None
        self.r: D = None
        self.q: C = None
        self.s: D = None
        self.y: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: C = None
        self.t: B = None
        self.w: E = None
        self.z: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: E = None
        self.x: D = None
        self.u: F = None
        self.z: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: C = None
        self.p: D = None
        self.r: C = None
        self.s: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: F = None
        self.z: D = None
        self.t: E = None
        self.w: D = None
        self.p: B = None
        self.s: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.t: D = None
        self.s: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.x: I = None
        self.p: E = None
        self.w: H = None
        self.t: A = None
        self.o: A = None
        self.z: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.v: I = None
        self.u: D = None
        self.r: D = None
        self.q: C = None
        self.s: D = None
        self.y: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: C = None
        self.t: B = None
        self.w: E = None
        self.z: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: E = None
        self.x: D = None
        self.u: F = None
        self.z: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: C = None
        self.p: D = None
        self.r: C = None
        self.s: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: F = None
        self.z: D = None
        self.t: E = None
        self.w: D = None
        self.p: B = None
        self.s: G = None
        self.txt = txt

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

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