class A:
    def __init__(self, txt: str):
        self.z: J = None
        self.u: D = None
        self.y: D = None
        self.v: D = None
        self.o: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: H = None
        self.q: F = None
        self.o: C = None
        self.v: F = None
        self.u: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.t: E = None
        self.s: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.w: A = None
        self.t: G = None
        self.r: B = None
        self.u: J = None
        self.y: D = None
        self.q: D = None
        self.s: C = None
        self.z: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: F = None
        self.v: H = None
        self.r: B = None
        self.x: I = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: H = None
        self.q: F = None
        self.o: C = None
        self.v: F = None
        self.u: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.t: E = None
        self.s: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.w: A = None
        self.t: G = None
        self.r: B = None
        self.u: J = None
        self.y: D = None
        self.q: D = None
        self.s: C = None
        self.z: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: F = None
        self.v: H = None
        self.r: B = None
        self.x: I = None
        self.txt = txt

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

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

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

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

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