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

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

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

class D:
    def __init__(self, txt: str):
        self.w: H = None
        self.z: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.v: H = None
        self.y: D = None
        self.z: D = None
        self.s: I = None
        self.w: B = None
        self.txt = txt

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

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.w: H = None
        self.z: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.v: H = None
        self.y: D = None
        self.z: D = None
        self.s: I = None
        self.w: B = None
        self.txt = txt

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

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

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

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

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

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