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

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.o: F = None
        self.z: B = None
        self.u: D = None
        self.v: G = None
        self.q: C = None
        self.x: B = None
        self.p: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.o: D = None
        self.z: B = None
        self.y: A = None
        self.q: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: D = None
        self.z: B = None
        self.y: A = None
        self.q: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: A = None
        self.x: G = None
        self.s: C = None
        self.o: D = None
        self.u: C = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.o: F = None
        self.z: B = None
        self.u: D = None
        self.v: G = None
        self.q: C = None
        self.x: B = None
        self.p: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.o: D = None
        self.z: B = None
        self.y: A = None
        self.q: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: D = None
        self.z: B = None
        self.y: A = None
        self.q: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: A = None
        self.x: G = None
        self.s: C = None
        self.o: D = None
        self.u: C = None
        self.txt = txt

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

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