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

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.o: H = None
        self.y: F = None
        self.v: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.t: B = None
        self.x: C = None
        self.q: B = None
        self.r: B = None
        self.y: G = None
        self.o: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.q: D = None
        self.x: H = None
        self.s: E = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.o: H = None
        self.y: F = None
        self.v: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.t: B = None
        self.x: C = None
        self.q: B = None
        self.r: B = None
        self.y: G = None
        self.o: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.q: D = None
        self.x: H = None
        self.s: E = None
        self.txt = txt

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

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

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