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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: H = None
        self.r: F = None
        self.q: F = None
        self.x: C = None
        self.w: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: I = None
        self.v: H = None
        self.s: I = None
        self.t: F = None
        self.y: B = None
        self.p: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: C = None
        self.y: A = None
        self.q: C = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: H = None
        self.r: F = None
        self.q: F = None
        self.x: C = None
        self.w: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: I = None
        self.v: H = None
        self.s: I = None
        self.t: F = None
        self.y: B = None
        self.p: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: C = None
        self.y: A = None
        self.q: C = None
        self.txt = txt

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

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