class A:
    def __init__(self, txt: str):
        self.s: C = None
        self.q: F = None
        self.p: J = None
        self.y: H = None
        self.o: I = None
        self.w: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: H = None
        self.p: G = None
        self.z: J = None
        self.u: A = None
        self.x: E = None
        self.q: J = None
        self.t: G = None
        self.r: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: I = None
        self.s: B = None
        self.o: F = None
        self.t: E = None
        self.y: E = None
        self.w: G = None
        self.p: D = None
        self.v: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.p: J = None
        self.t: H = None
        self.y: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.z: J = None
        self.o: A = None
        self.r: J = None
        self.v: F = None
        self.u: D = None
        self.p: G = None
        self.t: F = None
        self.s: F = None
        self.y: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: J = None
        self.p: D = None
        self.q: A = None
        self.o: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: J = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.u: F = None
        self.t: I = None
        self.o: F = None
        self.z: D = None
        self.w: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: H = None
        self.p: G = None
        self.z: J = None
        self.u: A = None
        self.x: E = None
        self.q: J = None
        self.t: G = None
        self.r: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: I = None
        self.s: B = None
        self.o: F = None
        self.t: E = None
        self.y: E = None
        self.w: G = None
        self.p: D = None
        self.v: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.p: J = None
        self.t: H = None
        self.y: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.z: J = None
        self.o: A = None
        self.r: J = None
        self.v: F = None
        self.u: D = None
        self.p: G = None
        self.t: F = None
        self.s: F = None
        self.y: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: J = None
        self.p: D = None
        self.q: A = None
        self.o: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: J = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.u: F = None
        self.t: I = None
        self.o: F = None
        self.z: D = None
        self.w: H = None
        self.txt = txt

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

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