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

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

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

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.w: B = None
        self.s: F = None
        self.t: A = None
        self.v: C = None
        self.x: C = None
        self.o: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.u: H = None
        self.t: A = None
        self.z: A = None
        self.w: B = None
        self.r: D = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.w: B = None
        self.s: F = None
        self.t: A = None
        self.v: C = None
        self.x: C = None
        self.o: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.u: H = None
        self.t: A = None
        self.z: A = None
        self.w: B = None
        self.r: D = None
        self.txt = txt

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

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

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

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