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

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

class C:
    def __init__(self, txt: str):
        self.z: H = None
        self.o: F = None
        self.y: A = None
        self.s: J = None
        self.u: A = None
        self.q: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.p: J = None
        self.o: I = None
        self.z: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.o: C = None
        self.r: A = None
        self.s: G = None
        self.z: H = None
        self.w: J = None
        self.p: D = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: H = None
        self.o: F = None
        self.y: A = None
        self.s: J = None
        self.u: A = None
        self.q: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.p: J = None
        self.o: I = None
        self.z: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.o: C = None
        self.r: A = None
        self.s: G = None
        self.z: H = None
        self.w: J = None
        self.p: D = None
        self.txt = txt

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

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

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