class A:
    def __init__(self, txt: str):
        self.s: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.x: J = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: C = None
        self.u: C = None
        self.s: F = None
        self.z: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.x: H = None
        self.w: J = None
        self.p: C = None
        self.q: A = None
        self.y: A = None
        self.s: D = None
        self.z: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: J = None
        self.u: B = None
        self.w: H = None
        self.o: A = None
        self.x: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: F = None
        self.r: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: J = None
        self.p: A = None
        self.s: F = None
        self.y: F = None
        self.q: C = None
        self.v: J = None
        self.w: F = None
        self.z: E = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.x: J = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: C = None
        self.u: C = None
        self.s: F = None
        self.z: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.x: H = None
        self.w: J = None
        self.p: C = None
        self.q: A = None
        self.y: A = None
        self.s: D = None
        self.z: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: J = None
        self.u: B = None
        self.w: H = None
        self.o: A = None
        self.x: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: F = None
        self.r: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: J = None
        self.p: A = None
        self.s: F = None
        self.y: F = None
        self.q: C = None
        self.v: J = None
        self.w: F = None
        self.z: E = None
        self.txt = txt

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

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

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