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

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

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.z: H = None
        self.p: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: I = None
        self.p: A = None
        self.v: G = None
        self.w: C = None
        self.o: F = None
        self.u: G = None
        self.x: H = None
        self.q: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.q: H = None
        self.txt = txt

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

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

h = A("h")
l = B("l")
d = C("d")
n = D("n")
m = E("m")
i = F("i")
k = G("k")
e = H("e")
a = I("a")

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

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

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.z: H = None
        self.p: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: I = None
        self.p: A = None
        self.v: G = None
        self.w: C = None
        self.o: F = None
        self.u: G = None
        self.x: H = None
        self.q: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.q: H = None
        self.txt = txt

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

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

h = A("h")
l = B("l")
d = C("d")
n = D("n")
m = E("m")
i = F("i")
k = G("k")
e = H("e")
a = I("a")

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