class A:
    def __init__(self, txt: str):
        self.s: F = None
        self.q: C = None
        self.x: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.t: D = None
        self.o: I = None
        self.s: F = None
        self.x: D = None
        self.v: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.q: H = None
        self.w: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: I = None
        self.x: J = None
        self.v: F = None
        self.t: F = None
        self.r: C = None
        self.q: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: H = None
        self.x: I = None
        self.z: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: B = None
        self.o: C = None
        self.r: A = None
        self.x: D = None
        self.t: D = None
        self.q: I = None
        self.s: F = None
        self.w: B = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.v: G = None
        self.t: C = None
        self.z: E = None
        self.txt = txt

c = A("c")
e = B("e")
m = C("m")
a = D("a")
f = E("f")
l = F("l")
n = G("n")
i = H("i")
g = I("g")
j = J("j")

c.s = l
c.x = l
c.q = m
e.r = a
e.t = a
e.x = a
e.v = a
e.o = g
e.s = l
m.o = e
m.q = i
m.w = i
a.o = g
a.x = j
a.v = l
a.t = l
a.r = m
a.q = e
f.o = n
f.p = n
f.w = g
f.s = m
f.v = e
f.q = i
f.z = i
f.y = c
l.w = i
l.x = g
l.z = c
n.t = l
n.q = a
n.v = f
i.z = e
i.w = e
i.o = m
i.r = c
i.x = a
i.t = a
i.q = g
i.s = l
g.q = c
g.v = m
g.o = l
g.x = f
j.v = n
j.t = m
j.z = f
assert f.y.x.w.s.z.q.w.o.q.r.txt == "
class A:
    def __init__(self, txt: str):
        self.s: F = None
        self.q: C = None
        self.x: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.t: D = None
        self.o: I = None
        self.s: F = None
        self.x: D = None
        self.v: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.q: H = None
        self.w: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: I = None
        self.x: J = None
        self.v: F = None
        self.t: F = None
        self.r: C = None
        self.q: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: H = None
        self.x: I = None
        self.z: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: B = None
        self.o: C = None
        self.r: A = None
        self.x: D = None
        self.t: D = None
        self.q: I = None
        self.s: F = None
        self.w: B = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.v: G = None
        self.t: C = None
        self.z: E = None
        self.txt = txt

c = A("c")
e = B("e")
m = C("m")
a = D("a")
f = E("f")
l = F("l")
n = G("n")
i = H("i")
g = I("g")
j = J("j")

c.s = l
c.x = l
c.q = m
e.r = a
e.t = a
e.x = a
e.v = a
e.o = g
e.s = l
m.o = e
m.q = i
m.w = i
a.o = g
a.x = j
a.v = l
a.t = l
a.r = m
a.q = e
f.o = n
f.p = n
f.w = g
f.s = m
f.v = e
f.q = i
f.z = i
f.y = c
l.w = i
l.x = g
l.z = c
n.t = l
n.q = a
n.v = f
i.z = e
i.w = e
i.o = m
i.r = c
i.x = a
i.t = a
i.q = g
i.s = l
g.q = c
g.v = m
g.o = l
g.x = f
j.v = n
j.t = m
j.z = f
assert f.y.x.w.s.z.q.w.o.q.r.txt == "c"