class A:
    def __init__(self, txt: str):
        self.x: I = None
        self.r: E = None
        self.z: C = None
        self.u: I = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.s: C = None
        self.p: C = None
        self.x: I = None
        self.y: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.q: H = None
        self.z: I = None
        self.r: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.y: D = None
        self.o: J = None
        self.u: A = None
        self.p: B = None
        self.w: I = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.s: I = None
        self.y: B = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.s: C = None
        self.p: C = None
        self.x: I = None
        self.y: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.q: H = None
        self.z: I = None
        self.r: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.y: D = None
        self.o: J = None
        self.u: A = None
        self.p: B = None
        self.w: I = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.s: I = None
        self.y: B = None
        self.txt = txt

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

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