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

class B:
    def __init__(self, txt: str):
        self.q: G = None
        self.y: G = None
        self.u: G = None
        self.w: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: G = None
        self.y: A = None
        self.u: E = None
        self.z: H = None
        self.w: H = None
        self.s: B = None
        self.x: G = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.z: F = None
        self.u: D = None
        self.t: D = None
        self.x: E = None
        self.o: B = None
        self.w: G = None
        self.s: F = None
        self.txt = txt

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

n = A("n")
a = B("a")
i = C("i")
k = D("k")
e = E("e")
b = F("b")
l = G("l")
d = H("d")
j = I("j")
g = A("g")

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

class B:
    def __init__(self, txt: str):
        self.q: G = None
        self.y: G = None
        self.u: G = None
        self.w: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: G = None
        self.y: A = None
        self.u: E = None
        self.z: H = None
        self.w: H = None
        self.s: B = None
        self.x: G = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.z: F = None
        self.u: D = None
        self.t: D = None
        self.x: E = None
        self.o: B = None
        self.w: G = None
        self.s: F = None
        self.txt = txt

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

n = A("n")
a = B("a")
i = C("i")
k = D("k")
e = E("e")
b = F("b")
l = G("l")
d = H("d")
j = I("j")
g = A("g")

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