class A:
    def __init__(self, txt: str):
        self.w: G = None
        self.r: F = None
        self.z: B = None
        self.s: I = None
        self.y: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.x: J = None
        self.y: J = None
        self.t: H = None
        self.q: H = None
        self.p: G = None
        self.r: F = None
        self.w: J = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.v: C = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.u: I = None
        self.v: D = None
        self.w: G = None
        self.t: B = None
        self.q: D = None
        self.s: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.x: J = None
        self.y: J = None
        self.t: H = None
        self.q: H = None
        self.p: G = None
        self.r: F = None
        self.w: J = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.v: C = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.u: I = None
        self.v: D = None
        self.w: G = None
        self.t: B = None
        self.q: D = None
        self.s: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

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

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

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