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

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

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

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.o: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.t: C = None
        self.w: D = None
        self.q: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: C = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.o: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.t: C = None
        self.w: D = None
        self.q: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: C = None
        self.txt = txt

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

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

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