class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.w: C = None
        self.t: B = None
        self.p: B = None
        self.s: B = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.u: D = None
        self.q: E = None
        self.t: H = None
        self.x: C = None
        self.z: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: B = None
        self.p: G = None
        self.t: C = None
        self.o: B = None
        self.txt = txt

i = A("i")
e = B("e")
m = C("m")
k = D("k")
g = E("g")
d = F("d")
c = G("c")
l = H("l")
f = E("f")

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.u: D = None
        self.q: E = None
        self.t: H = None
        self.x: C = None
        self.z: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: B = None
        self.p: G = None
        self.t: C = None
        self.o: B = None
        self.txt = txt

i = A("i")
e = B("e")
m = C("m")
k = D("k")
g = E("g")
d = F("d")
c = G("c")
l = H("l")
f = E("f")

i.z = e
i.t = e
i.p = e
i.s = e
i.w = m
e.y = g
m.t = c
m.v = d
m.p = d
m.q = i
m.y = f
k.u = i
k.t = l
k.x = e
k.v = g
k.w = m
g.z = c
g.v = e
g.q = e
g.y = f
g.w = k
g.o = k
d.p = m
d.x = m
d.u = k
d.z = k
d.q = g
d.t = l
c.s = k
c.v = k
c.r = k
c.z = e
c.q = d
c.u = m
c.w = i
l.r = e
l.o = e
l.p = c
l.t = m
f.z = c
f.v = e
f.q = e
f.y = g
f.w = k
f.o = k
assert d.t.t.v.txt == "d"