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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: C = None
        self.p: H = None
        self.o: D = None
        self.w: D = None
        self.z: H = None
        self.q: C = None
        self.v: A = None
        self.t: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: E = None
        self.p: B = None
        self.o: E = None
        self.t: D = None
        self.txt = txt

b = A("b")
h = B("h")
a = C("a")
i = D("i")
k = E("k")
c = F("c")
d = G("d")
j = H("j")
m = E("m")
n = B("n")

b.w = j
h.t = j
h.u = a
h.o = k
h.s = d
a.y = c
a.s = j
a.z = i
i.w = j
i.r = j
i.x = h
i.u = b
i.y = a
i.s = m
i.v = n
k.t = j
k.u = b
k.o = n
k.x = c
k.s = c
k.z = i
k.q = h
c.o = i
c.q = i
c.y = n
c.w = j
c.r = d
d.s = a
d.q = a
d.p = j
d.z = j
d.t = j
d.o = i
d.w = i
d.v = b
j.v = k
j.o = k
j.p = n
j.t = i
m.t = j
m.u = b
m.o = h
m.q = h
m.x = c
m.s = c
m.z = i
n.t = j
n.u = a
n.o = m
n.s = d
assert j.t.v.s.v.w.o.x.r.o.txt == "
class A:
    def __init__(self, txt: str):
        self.w: H = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: C = None
        self.p: H = None
        self.o: D = None
        self.w: D = None
        self.z: H = None
        self.q: C = None
        self.v: A = None
        self.t: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: E = None
        self.p: B = None
        self.o: E = None
        self.t: D = None
        self.txt = txt

b = A("b")
h = B("h")
a = C("a")
i = D("i")
k = E("k")
c = F("c")
d = G("d")
j = H("j")
m = E("m")
n = B("n")

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