class A:
    def __init__(self, txt: str):
        self.w: D = None
        self.y: J = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.w: B = None
        self.x: A = None
        self.v: J = None
        self.q: J = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: I = None
        self.y: J = None
        self.r: H = None
        self.t: H = None
        self.x: J = None
        self.v: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: J = None
        self.s: H = None
        self.t: E = None
        self.o: C = None
        self.z: C = None
        self.r: I = None
        self.y: C = None
        self.v: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: A = None
        self.p: J = None
        self.x: I = None
        self.v: C = None
        self.z: F = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.o: A = None
        self.r: I = None
        self.w: F = None
        self.z: A = None
        self.s: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.w: B = None
        self.x: A = None
        self.v: J = None
        self.q: J = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: I = None
        self.y: J = None
        self.r: H = None
        self.t: H = None
        self.x: J = None
        self.v: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: J = None
        self.s: H = None
        self.t: E = None
        self.o: C = None
        self.z: C = None
        self.r: I = None
        self.y: C = None
        self.v: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: A = None
        self.p: J = None
        self.x: I = None
        self.v: C = None
        self.z: F = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.o: A = None
        self.r: I = None
        self.w: F = None
        self.z: A = None
        self.s: A = None
        self.txt = txt

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

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