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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.p: B = None
        self.txt = txt

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

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

e = A("e")
f = B("f")
g = C("g")
l = D("l")
i = E("i")
a = F("a")
h = G("h")
d = H("d")
b = H("b")

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.p: B = None
        self.txt = txt

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

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

e = A("e")
f = B("f")
g = C("g")
l = D("l")
i = E("i")
a = F("a")
h = G("h")
d = H("d")
b = H("b")

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