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

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.v: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.p: E = None
        self.u: E = None
        self.t: D = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.v: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.p: E = None
        self.u: E = None
        self.t: D = None
        self.txt = txt

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

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

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