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

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

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.r: D = None
        self.z: A = None
        self.u: I = None
        self.x: G = None
        self.q: D = None
        self.y: A = None
        self.o: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.s: F = None
        self.w: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.w: I = None
        self.o: F = None
        self.s: B = None
        self.txt = txt

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.r: D = None
        self.z: A = None
        self.u: I = None
        self.x: G = None
        self.q: D = None
        self.y: A = None
        self.o: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.s: F = None
        self.w: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.w: I = None
        self.o: F = None
        self.s: B = None
        self.txt = txt

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

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

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

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

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

k.z = e
h.q = c
h.w = a
h.y = k
h.o = d
h.p = f
h.u = i
d.p = k
d.z = k
d.y = k
d.r = c
d.q = c
d.u = i
d.x = e
d.o = h
c.r = f
c.w = f
c.s = a
f.u = d
f.w = i
f.o = a
f.s = h
a.v = j
a.t = d
a.r = f
a.x = f
a.u = k
e.t = k
j.v = c
j.y = c
j.p = d
j.q = f
j.x = f
j.z = a
i.q = d
i.r = a
i.s = a
i.z = c
i.u = c
i.y = c
i.x = h
i.w = h
i.p = e
assert e.t.z.t.z.t.z.t.z.t.txt == "k"