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

class B:
    def __init__(self, txt: str):
        self.t: J = None
        self.s: E = None
        self.y: C = None
        self.q: F = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: I = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.v: B = None
        self.o: F = None
        self.p: B = None
        self.u: B = None
        self.q: A = None
        self.y: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: I = None
        self.x: F = None
        self.p: H = None
        self.z: G = None
        self.u: H = None
        self.r: G = None
        self.q: C = None
        self.w: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: J = None
        self.s: E = None
        self.y: C = None
        self.q: F = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: I = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.v: B = None
        self.o: F = None
        self.p: B = None
        self.u: B = None
        self.q: A = None
        self.y: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: I = None
        self.x: F = None
        self.p: H = None
        self.z: G = None
        self.u: H = None
        self.r: G = None
        self.q: C = None
        self.w: E = None
        self.txt = txt

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

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