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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.w: F = None
        self.p: C = None
        self.o: D = None
        self.v: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: C = None
        self.z: C = None
        self.p: E = None
        self.q: B = None
        self.s: A = None
        self.r: C = None
        self.y: C = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.p: H = None
        self.v: F = None
        self.z: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.w: F = None
        self.p: C = None
        self.o: D = None
        self.v: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: C = None
        self.z: C = None
        self.p: E = None
        self.q: B = None
        self.s: A = None
        self.r: C = None
        self.y: C = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.p: H = None
        self.v: F = None
        self.z: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

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

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

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