class A:
    def __init__(self, txt: str):
        self.v: E = None
        self.s: G = None
        self.x: G = None
        self.z: J = None
        self.u: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.y: A = None
        self.u: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: I = None
        self.p: A = None
        self.u: J = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.p: J = None
        self.v: G = None
        self.r: G = None
        self.t: H = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.z: J = None
        self.r: F = None
        self.q: J = None
        self.x: H = None
        self.y: J = None
        self.o: J = None
        self.s: D = None
        self.w: G = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.y: A = None
        self.u: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: I = None
        self.p: A = None
        self.u: J = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.p: J = None
        self.v: G = None
        self.r: G = None
        self.t: H = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.z: J = None
        self.r: F = None
        self.q: J = None
        self.x: H = None
        self.y: J = None
        self.o: J = None
        self.s: D = None
        self.w: G = None
        self.txt = txt

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

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

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