class A:
    def __init__(self, txt: str):
        self.s: C = None
        self.w: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: D = None
        self.w: B = None
        self.u: A = None
        self.r: D = None
        self.z: A = None
        self.v: B = None
        self.s: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.z: E = None
        self.t: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: E = None
        self.t: G = None
        self.s: E = None
        self.txt = txt

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

g = A("g")
f = B("f")
j = C("j")
a = D("a")
k = E("k")
n = F("n")
d = G("d")
l = H("l")
h = D("h")
c = G("c")

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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: D = None
        self.w: B = None
        self.u: A = None
        self.r: D = None
        self.z: A = None
        self.v: B = None
        self.s: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.z: E = None
        self.t: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: E = None
        self.t: G = None
        self.s: E = None
        self.txt = txt

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

g = A("g")
f = B("f")
j = C("j")
a = D("a")
k = E("k")
n = F("n")
d = G("d")
l = H("l")
h = D("h")
c = G("c")

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