class A:
    def __init__(self, txt: str):
        self.u: F = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: A = None
        self.s: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.t: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: G = None
        self.p: E = None
        self.t: F = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: A = None
        self.s: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.t: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: G = None
        self.p: E = None
        self.t: F = None
        self.txt = txt

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

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