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

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.r: F = None
        self.o: A = None
        self.q: G = None
        self.w: C = None
        self.v: E = None
        self.x: A = None
        self.z: E = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: D = None
        self.s: D = None
        self.y: G = None
        self.p: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: H = None
        self.s: E = None
        self.y: A = None
        self.p: C = None
        self.t: H = None
        self.o: G = None
        self.w: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.r: F = None
        self.o: A = None
        self.q: G = None
        self.w: C = None
        self.v: E = None
        self.x: A = None
        self.z: E = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: D = None
        self.s: D = None
        self.y: G = None
        self.p: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: H = None
        self.s: E = None
        self.y: A = None
        self.p: C = None
        self.t: H = None
        self.o: G = None
        self.w: G = None
        self.txt = txt

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

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