class A:
    def __init__(self, txt: str):
        self.v: D = None
        self.p: B = None
        self.z: C = None
        self.q: E = None
        self.w: G = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.r: A = None
        self.u: H = None
        self.o: J = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.y: A = None
        self.o: H = None
        self.t: I = None
        self.v: I = None
        self.z: F = None
        self.w: F = None
        self.q: A = None
        self.u: A = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.r: A = None
        self.u: H = None
        self.o: J = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.y: A = None
        self.o: H = None
        self.t: I = None
        self.v: I = None
        self.z: F = None
        self.w: F = None
        self.q: A = None
        self.u: A = None
        self.txt = txt

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

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