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

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

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.s: D = None
        self.t: E = None
        self.r: A = None
        self.z: G = None
        self.v: A = None
        self.q: F = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.s: D = None
        self.t: E = None
        self.r: A = None
        self.z: G = None
        self.v: A = None
        self.q: F = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

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

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

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