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

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: H = None
        self.q: A = None
        self.t: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: I = None
        self.y: D = None
        self.z: E = None
        self.q: J = None
        self.p: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.o: E = None
        self.q: E = None
        self.r: F = None
        self.t: J = None
        self.u: B = None
        self.p: J = None
        self.x: B = None
        self.v: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.o: D = None
        self.w: E = None
        self.u: E = None
        self.z: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: H = None
        self.r: B = None
        self.x: G = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: H = None
        self.q: A = None
        self.t: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: I = None
        self.y: D = None
        self.z: E = None
        self.q: J = None
        self.p: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.o: E = None
        self.q: E = None
        self.r: F = None
        self.t: J = None
        self.u: B = None
        self.p: J = None
        self.x: B = None
        self.v: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.o: D = None
        self.w: E = None
        self.u: E = None
        self.z: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: H = None
        self.r: B = None
        self.x: G = None
        self.txt = txt

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

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