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

class B:
    def __init__(self, txt: str):
        self.y: G = None
        self.u: A = None
        self.o: I = None
        self.v: C = None
        self.q: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.v: B = None
        self.y: D = None
        self.z: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: C = None
        self.w: E = None
        self.r: B = None
        self.p: D = None
        self.x: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: D = None
        self.z: B = None
        self.o: C = None
        self.q: B = None
        self.v: B = None
        self.x: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: G = None
        self.u: A = None
        self.o: I = None
        self.v: C = None
        self.q: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.v: B = None
        self.y: D = None
        self.z: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: C = None
        self.w: E = None
        self.r: B = None
        self.p: D = None
        self.x: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: D = None
        self.z: B = None
        self.o: C = None
        self.q: B = None
        self.v: B = None
        self.x: H = None
        self.txt = txt

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

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