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

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.w: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.r: J = None
        self.v: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.u: B = None
        self.y: C = None
        self.s: B = None
        self.w: J = None
        self.x: C = None
        self.r: J = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: C = None
        self.w: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: I = None
        self.t: C = None
        self.o: E = None
        self.p: C = None
        self.z: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: F = None
        self.w: G = None
        self.q: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: G = None
        self.t: H = None
        self.w: H = None
        self.z: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.w: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.r: J = None
        self.v: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.u: B = None
        self.y: C = None
        self.s: B = None
        self.w: J = None
        self.x: C = None
        self.r: J = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: C = None
        self.w: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: I = None
        self.t: C = None
        self.o: E = None
        self.p: C = None
        self.z: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: F = None
        self.w: G = None
        self.q: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: G = None
        self.t: H = None
        self.w: H = None
        self.z: D = None
        self.txt = txt

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

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