class A:
    def __init__(self, txt: str):
        self.o: C = None
        self.y: D = None
        self.s: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.x: I = None
        self.s: B = None
        self.p: F = None
        self.z: I = None
        self.q: G = None
        self.o: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.t: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.t: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: I = None
        self.v: G = None
        self.y: G = None
        self.x: F = None
        self.s: F = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.x: I = None
        self.s: B = None
        self.p: F = None
        self.z: I = None
        self.q: G = None
        self.o: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.t: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.t: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: I = None
        self.v: G = None
        self.y: G = None
        self.x: F = None
        self.s: F = None
        self.txt = txt

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

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