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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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