class A:
    def __init__(self, txt: str):
        self.v: H = None
        self.r: F = None
        self.u: C = None
        self.z: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.t: F = None
        self.v: E = None
        self.w: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.p: J = None
        self.x: G = None
        self.t: C = None
        self.w: G = None
        self.s: I = None
        self.u: J = None
        self.q: B = None
        self.z: G = None
        self.v: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.v: J = None
        self.x: H = None
        self.q: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: E = None
        self.y: H = None
        self.z: I = None
        self.s: F = None
        self.q: F = None
        self.p: I = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.t: F = None
        self.v: E = None
        self.w: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.p: J = None
        self.x: G = None
        self.t: C = None
        self.w: G = None
        self.s: I = None
        self.u: J = None
        self.q: B = None
        self.z: G = None
        self.v: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.v: J = None
        self.x: H = None
        self.q: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: E = None
        self.y: H = None
        self.z: I = None
        self.s: F = None
        self.q: F = None
        self.p: I = None
        self.txt = txt

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

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

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

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

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