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

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

class C:
    def __init__(self, txt: str):
        self.q: H = None
        self.y: D = None
        self.x: G = None
        self.u: E = None
        self.t: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.w: F = None
        self.r: E = None
        self.v: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: H = None
        self.t: C = None
        self.x: B = None
        self.z: I = None
        self.s: B = None
        self.y: B = None
        self.u: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: A = None
        self.z: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: F = None
        self.w: F = None
        self.t: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: H = None
        self.y: D = None
        self.x: G = None
        self.u: E = None
        self.t: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.w: F = None
        self.r: E = None
        self.v: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: H = None
        self.t: C = None
        self.x: B = None
        self.z: I = None
        self.s: B = None
        self.y: B = None
        self.u: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: A = None
        self.z: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: F = None
        self.w: F = None
        self.t: F = None
        self.txt = txt

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

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