class A:
    def __init__(self, txt: str):
        self.v: G = None
        self.s: F = None
        self.y: C = None
        self.q: B = None
        self.u: C = None
        self.t: B = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.u: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.x: C = None
        self.p: G = None
        self.u: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.y: D = None
        self.u: A = None
        self.t: H = None
        self.s: A = None
        self.x: E = None
        self.r: D = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.u: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.x: C = None
        self.p: G = None
        self.u: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.y: D = None
        self.u: A = None
        self.t: H = None
        self.s: A = None
        self.x: E = None
        self.r: D = None
        self.txt = txt

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

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

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