class A:
    def __init__(self, txt: str):
        self.v: F = None
        self.x: D = None
        self.s: G = None
        self.o: B = None
        self.t: C = None
        self.u: E = None
        self.q: J = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: J = None
        self.s: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: H = None
        self.r: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.x: J = None
        self.p: C = None
        self.t: D = None
        self.w: G = None
        self.o: A = None
        self.z: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: J = None
        self.v: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: C = None
        self.r: D = None
        self.u: J = None
        self.q: A = None
        self.w: C = None
        self.y: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

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

b = A("b")
f = B("f")
m = C("m")
l = D("l")
k = E("k")
g = F("g")
i = G("i")
h = H("h")
n = I("n")
j = J("j")

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

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

class C:
    def __init__(self, txt: str):
        self.z: J = None
        self.s: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: H = None
        self.r: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.x: J = None
        self.p: C = None
        self.t: D = None
        self.w: G = None
        self.o: A = None
        self.z: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: J = None
        self.v: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: C = None
        self.r: D = None
        self.u: J = None
        self.q: A = None
        self.w: C = None
        self.y: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

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

b = A("b")
f = B("f")
m = C("m")
l = D("l")
k = E("k")
g = F("g")
i = G("i")
h = H("h")
n = I("n")
j = J("j")

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