class A:
    def __init__(self, txt: str):
        self.w: D = None
        self.z: B = None
        self.v: E = None
        self.s: I = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: I = None
        self.q: B = None
        self.v: A = None
        self.o: F = None
        self.s: I = None
        self.z: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.s: I = None
        self.q: D = None
        self.u: B = None
        self.w: G = None
        self.r: I = None
        self.y: A = None
        self.x: D = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: I = None
        self.q: B = None
        self.v: A = None
        self.o: F = None
        self.s: I = None
        self.z: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.s: I = None
        self.q: D = None
        self.u: B = None
        self.w: G = None
        self.r: I = None
        self.y: A = None
        self.x: D = None
        self.txt = txt

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

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

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