class A:
    def __init__(self, txt: str):
        self.q: C = None
        self.v: E = None
        self.x: D = None
        self.z: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: J = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.p: E = None
        self.w: A = None
        self.o: J = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.y: B = None
        self.x: H = None
        self.p: C = None
        self.o: J = None
        self.v: J = None
        self.q: F = None
        self.r: D = None
        self.s: H = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: J = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.p: E = None
        self.w: A = None
        self.o: J = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.y: B = None
        self.x: H = None
        self.p: C = None
        self.o: J = None
        self.v: J = None
        self.q: F = None
        self.r: D = None
        self.s: H = None
        self.txt = txt

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

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

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