class A:
    def __init__(self, txt: str):
        self.w: C = None
        self.o: H = None
        self.y: F = None
        self.x: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.s: D = None
        self.r: I = None
        self.q: F = None
        self.p: F = None
        self.w: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.q: H = None
        self.z: B = None
        self.v: F = None
        self.w: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.w: A = None
        self.x: E = None
        self.o: E = None
        self.y: H = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.t: E = None
        self.txt = txt

m = A("m")
k = B("k")
h = C("h")
g = D("g")
d = E("d")
a = F("a")
e = G("e")
l = H("l")
i = I("i")

m.w = h
m.o = l
m.y = a
m.x = d
k.y = h
k.s = g
k.r = i
k.q = a
k.p = a
k.w = d
h.z = k
h.t = m
h.s = m
h.w = e
h.x = a
h.u = i
h.o = g
h.r = d
h.v = l
g.x = k
g.z = k
g.q = l
g.v = a
g.w = a
d.v = h
d.z = h
d.q = e
d.s = m
d.u = m
a.r = d
a.x = d
a.o = d
a.w = m
a.y = l
e.s = d
e.u = l
e.t = k
e.z = g
l.s = e
l.y = g
l.w = h
l.u = h
l.r = m
i.t = d
assert a.w.o.s.t.txt == "
class A:
    def __init__(self, txt: str):
        self.w: C = None
        self.o: H = None
        self.y: F = None
        self.x: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.s: D = None
        self.r: I = None
        self.q: F = None
        self.p: F = None
        self.w: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.q: H = None
        self.z: B = None
        self.v: F = None
        self.w: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.w: A = None
        self.x: E = None
        self.o: E = None
        self.y: H = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.t: E = None
        self.txt = txt

m = A("m")
k = B("k")
h = C("h")
g = D("g")
d = E("d")
a = F("a")
e = G("e")
l = H("l")
i = I("i")

m.w = h
m.o = l
m.y = a
m.x = d
k.y = h
k.s = g
k.r = i
k.q = a
k.p = a
k.w = d
h.z = k
h.t = m
h.s = m
h.w = e
h.x = a
h.u = i
h.o = g
h.r = d
h.v = l
g.x = k
g.z = k
g.q = l
g.v = a
g.w = a
d.v = h
d.z = h
d.q = e
d.s = m
d.u = m
a.r = d
a.x = d
a.o = d
a.w = m
a.y = l
e.s = d
e.u = l
e.t = k
e.z = g
l.s = e
l.y = g
l.w = h
l.u = h
l.r = m
i.t = d
assert a.w.o.s.t.txt == "k"