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

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.t: I = None
        self.q: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: I = None
        self.s: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.w: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: C = None
        self.t: B = None
        self.q: C = None
        self.r: I = None
        self.v: A = None
        self.x: B = None
        self.z: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: B = None
        self.o: A = None
        self.p: J = None
        self.x: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: I = None
        self.y: H = None
        self.v: A = None
        self.x: I = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.t: I = None
        self.q: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: I = None
        self.s: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.w: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: C = None
        self.t: B = None
        self.q: C = None
        self.r: I = None
        self.v: A = None
        self.x: B = None
        self.z: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: B = None
        self.o: A = None
        self.p: J = None
        self.x: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: I = None
        self.y: H = None
        self.v: A = None
        self.x: I = None
        self.txt = txt

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

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