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

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

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.w: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.o: G = None
        self.y: F = None
        self.t: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: I = None
        self.o: D = None
        self.x: E = None
        self.y: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: B = None
        self.t: G = None
        self.y: C = None
        self.txt = txt

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

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

d.o = h
d.t = h
d.z = k
d.s = m
d.w = i
a.q = n
a.z = k
a.s = m
a.r = e
a.y = e
a.t = d
a.x = b
a.o = j
a.w = i
e.p = n
e.w = j
n.p = m
b.r = e
b.o = h
b.y = m
b.t = a
m.z = b
m.u = b
m.o = h
m.t = h
m.w = e
m.y = e
m.q = n
m.x = a
m.s = k
h.r = j
h.y = j
h.o = n
h.x = b
k.s = a
k.t = h
k.y = e
j.t = d
j.r = e
j.p = n
j.o = a
j.s = k
i.o = h
i.t = h
i.z = k
i.s = m
i.w = d
assert d.z.s.o.s.t.x.t.w.z.txt == "
class A:
    def __init__(self, txt: str):
        self.o: G = None
        self.t: G = None
        self.z: H = None
        self.s: F = None
        self.w: A = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.w: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.o: G = None
        self.y: F = None
        self.t: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: I = None
        self.o: D = None
        self.x: E = None
        self.y: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: B = None
        self.t: G = None
        self.y: C = None
        self.txt = txt

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

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

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