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

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: I = None
        self.s: H = None
        self.x: F = None
        self.q: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: I = None
        self.u: F = None
        self.o: J = None
        self.t: F = None
        self.p: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: G = None
        self.z: E = None
        self.x: C = None
        self.o: F = None
        self.txt = txt

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

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

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

m.z = a
m.q = k
m.u = k
m.s = k
m.r = c
m.y = c
m.v = e
m.w = b
m.o = i
c.o = e
c.w = e
c.v = e
c.r = i
c.p = k
c.y = k
c.z = h
c.u = m
c.s = b
h.v = b
h.t = b
h.r = g
h.y = i
h.o = i
h.s = k
h.z = m
g.x = c
g.q = m
g.p = m
g.v = e
g.u = e
g.z = e
g.w = d
g.r = d
g.t = k
e.u = k
e.s = b
e.x = d
e.q = c
d.q = k
d.o = k
d.y = k
d.t = k
d.r = m
d.v = b
d.w = g
d.p = g
d.x = c
d.z = a
i.z = k
i.u = d
i.t = d
i.o = a
i.p = a
b.y = i
b.z = e
b.x = h
b.o = d
k.t = c
k.y = c
k.s = e
k.w = h
k.x = a
a.o = m
a.s = i
a.r = g
a.u = d
assert h.r.t.y.r.z.x.r.p.q.s.txt == "
class A:
    def __init__(self, txt: str):
        self.z: J = None
        self.q: I = None
        self.r: B = None
        self.v: E = None
        self.w: H = None
        self.u: I = None
        self.o: G = None
        self.s: I = None
        self.y: B = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: I = None
        self.s: H = None
        self.x: F = None
        self.q: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: I = None
        self.u: F = None
        self.o: J = None
        self.t: F = None
        self.p: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: G = None
        self.z: E = None
        self.x: C = None
        self.o: F = None
        self.txt = txt

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

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

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

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