class A:
    def __init__(self, txt: str):
        self.t: C = None
        self.p: E = None
        self.u: H = None
        self.s: I = None
        self.z: B = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.p: H = None
        self.z: A = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.z: E = None
        self.t: E = None
        self.o: H = None
        self.s: D = None
        self.w: H = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.p: H = None
        self.z: A = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.z: E = None
        self.t: E = None
        self.o: H = None
        self.s: D = None
        self.w: H = None
        self.txt = txt

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

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