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

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

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.o: G = None
        self.z: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: I = None
        self.o: H = None
        self.y: H = None
        self.u: B = None
        self.r: A = None
        self.z: E = None
        self.q: A = None
        self.x: E = None
        self.v: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.o: A = None
        self.v: I = None
        self.y: F = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.y: C = None
        self.u: C = None
        self.v: C = None
        self.r: B = None
        self.p: D = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.o: G = None
        self.z: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: I = None
        self.o: H = None
        self.y: H = None
        self.u: B = None
        self.r: A = None
        self.z: E = None
        self.q: A = None
        self.x: E = None
        self.v: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.o: A = None
        self.v: I = None
        self.y: F = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.y: C = None
        self.u: C = None
        self.v: C = None
        self.r: B = None
        self.p: D = None
        self.txt = txt

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

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

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