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

class B:
    def __init__(self, txt: str):
        self.o: G = None
        self.q: J = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: J = None
        self.v: C = None
        self.s: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.w: J = None
        self.s: D = None
        self.r: A = None
        self.z: B = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.w: H = None
        self.z: I = None
        self.o: H = None
        self.x: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: G = None
        self.q: J = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: J = None
        self.v: C = None
        self.s: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.w: J = None
        self.s: D = None
        self.r: A = None
        self.z: B = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.w: H = None
        self.z: I = None
        self.o: H = None
        self.x: H = None
        self.txt = txt

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

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