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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.o: G = None
        self.q: B = None
        self.v: C = None
        self.u: A = None
        self.txt = txt

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

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.o: G = None
        self.q: B = None
        self.v: C = None
        self.u: A = None
        self.txt = txt

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

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

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

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

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