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

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.t: F = None
        self.o: D = None
        self.y: J = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: J = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: H = None
        self.u: D = None
        self.r: G = None
        self.z: E = None
        self.y: G = None
        self.p: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.t: I = None
        self.x: E = None
        self.s: C = None
        self.y: F = None
        self.p: J = None
        self.q: H = None
        self.o: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: G = None
        self.x: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: A = None
        self.t: D = None
        self.y: D = None
        self.r: A = None
        self.u: G = None
        self.q: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: I = None
        self.s: H = None
        self.w: I = None
        self.u: I = None
        self.v: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.t: F = None
        self.o: D = None
        self.y: J = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: J = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: H = None
        self.u: D = None
        self.r: G = None
        self.z: E = None
        self.y: G = None
        self.p: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.t: I = None
        self.x: E = None
        self.s: C = None
        self.y: F = None
        self.p: J = None
        self.q: H = None
        self.o: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: G = None
        self.x: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: A = None
        self.t: D = None
        self.y: D = None
        self.r: A = None
        self.u: G = None
        self.q: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: I = None
        self.s: H = None
        self.w: I = None
        self.u: I = None
        self.v: A = None
        self.txt = txt

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

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