class A:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: I = None
        self.y: E = None
        self.o: E = None
        self.w: C = None
        self.u: F = None
        self.z: I = None
        self.r: E = None
        self.x: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: I = None
        self.z: G = None
        self.x: A = None
        self.u: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: H = None
        self.p: E = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.t: A = None
        self.v: D = None
        self.p: C = None
        self.o: C = None
        self.x: C = None
        self.u: A = None
        self.w: A = None
        self.z: A = None
        self.txt = txt

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

a.x = n
n.v = c
n.z = c
n.y = m
n.o = m
n.r = m
n.w = j
n.u = g
n.x = d
j.t = e
j.r = e
j.w = f
j.o = k
j.y = m
f.y = c
f.z = d
f.x = a
f.u = j
m.y = a
g.u = c
g.q = k
g.t = m
g.r = d
d.v = e
d.p = m
e.z = g
e.y = g
e.p = d
e.o = d
e.r = m
e.x = a
e.w = k
e.q = c
e.t = f
e.u = j
c.o = d
c.p = d
c.z = j
k.t = a
k.u = a
k.w = a
k.z = a
k.v = f
k.p = j
k.o = j
k.x = j
assert k.o.w.u.r.t.y.o.p.y.txt == "
class A:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: I = None
        self.y: E = None
        self.o: E = None
        self.w: C = None
        self.u: F = None
        self.z: I = None
        self.r: E = None
        self.x: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: I = None
        self.z: G = None
        self.x: A = None
        self.u: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: H = None
        self.p: E = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.t: A = None
        self.v: D = None
        self.p: C = None
        self.o: C = None
        self.x: C = None
        self.u: A = None
        self.w: A = None
        self.z: A = None
        self.txt = txt

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

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