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

class B:
    def __init__(self, txt: str):
        self.p: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: I = None
        self.q: B = None
        self.u: G = None
        self.p: E = None
        self.o: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.r: C = None
        self.t: J = None
        self.x: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: H = None
        self.p: C = None
        self.z: C = None
        self.u: A = None
        self.x: C = None
        self.y: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: D = None
        self.o: E = None
        self.x: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: G = None
        self.x: J = None
        self.u: J = None
        self.o: B = None
        self.z: G = None
        self.q: A = None
        self.v: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: B = None
        self.q: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: I = None
        self.q: B = None
        self.u: G = None
        self.p: E = None
        self.o: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.r: C = None
        self.t: J = None
        self.x: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: H = None
        self.p: C = None
        self.z: C = None
        self.u: A = None
        self.x: C = None
        self.y: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: D = None
        self.o: E = None
        self.x: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: G = None
        self.x: J = None
        self.u: J = None
        self.o: B = None
        self.z: G = None
        self.q: A = None
        self.v: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: B = None
        self.q: E = None
        self.txt = txt

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

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