class A:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: I = None
        self.q: F = None
        self.w: I = None
        self.o: G = None
        self.t: F = None
        self.p: A = None
        self.z: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: H = None
        self.o: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: G = None
        self.t: I = None
        self.o: G = None
        self.y: F = None
        self.w: A = None
        self.s: H = None
        self.txt = txt

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.q: B = None
        self.u: H = None
        self.t: G = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: I = None
        self.q: F = None
        self.w: I = None
        self.o: G = None
        self.t: F = None
        self.p: A = None
        self.z: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: H = None
        self.o: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: G = None
        self.t: I = None
        self.o: G = None
        self.y: F = None
        self.w: A = None
        self.s: H = None
        self.txt = txt

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.q: B = None
        self.u: H = None
        self.t: G = None
        self.txt = txt

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

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