class A:
    def __init__(self, txt: str):
        self.x: C = None
        self.v: B = None
        self.q: E = None
        self.s: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.y: J = None
        self.o: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: J = None
        self.t: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.s: J = None
        self.t: H = None
        self.q: A = None
        self.w: D = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.x: G = None
        self.y: H = None
        self.s: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: B = None
        self.w: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.y: J = None
        self.o: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: J = None
        self.t: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.s: J = None
        self.t: H = None
        self.q: A = None
        self.w: D = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.x: G = None
        self.y: H = None
        self.s: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: B = None
        self.w: A = None
        self.txt = txt

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

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