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

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.y: F = None
        self.q: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: I = None
        self.s: A = None
        self.o: B = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.u: A = None
        self.v: B = None
        self.txt = txt

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

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

c.s = n
c.q = h
k.v = n
k.y = m
k.q = h
a.x = c
a.o = b
a.q = b
a.v = f
a.s = f
a.t = m
a.z = h
a.r = n
a.u = d
g.q = f
g.s = c
g.o = k
n.o = g
n.r = g
n.x = f
n.q = m
n.s = a
n.y = c
m.o = h
h.s = n
h.u = n
h.o = d
h.z = b
h.t = g
d.u = c
d.v = k
f.x = k
f.u = n
b.x = c
b.o = a
b.q = a
b.v = f
b.s = f
b.t = m
b.z = h
b.r = n
b.u = d
assert k.y.o.z.t.o.t.s.q.o.u.txt == "
class A:
    def __init__(self, txt: str):
        self.s: E = None
        self.q: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.y: F = None
        self.q: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: I = None
        self.s: A = None
        self.o: B = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.u: A = None
        self.v: B = None
        self.txt = txt

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

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

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