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

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

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

class D:
    def __init__(self, txt: str):
        self.s: H = None
        self.p: B = None
        self.w: G = None
        self.z: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.x: I = None
        self.s: A = None
        self.o: G = None
        self.z: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.r: A = None
        self.q: C = None
        self.v: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: D = None
        self.r: F = None
        self.v: G = None
        self.y: D = None
        self.z: D = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: H = None
        self.p: B = None
        self.w: G = None
        self.z: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.x: I = None
        self.s: A = None
        self.o: G = None
        self.z: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.r: A = None
        self.q: C = None
        self.v: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: D = None
        self.r: F = None
        self.v: G = None
        self.y: D = None
        self.z: D = None
        self.txt = txt

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

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