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

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

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

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.p: E = None
        self.r: I = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.s: H = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.p: E = None
        self.r: I = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.s: H = None
        self.txt = txt

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

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