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

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

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

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.o: B = None
        self.t: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.u: F = None
        self.q: B = None
        self.s: H = None
        self.v: H = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.o: B = None
        self.t: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.u: F = None
        self.q: B = None
        self.s: H = None
        self.v: H = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

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

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