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

class B:
    def __init__(self, txt: str):
        self.w: J = None
        self.q: I = None
        self.r: C = None
        self.t: E = None
        self.z: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: H = None
        self.y: F = None
        self.s: A = None
        self.w: A = None
        self.v: A = None
        self.z: H = None
        self.o: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.v: I = None
        self.z: B = None
        self.y: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: C = None
        self.o: J = None
        self.p: H = None
        self.v: J = None
        self.s: H = None
        self.r: E = None
        self.y: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: F = None
        self.r: E = None
        self.p: I = None
        self.u: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: J = None
        self.q: I = None
        self.r: C = None
        self.t: E = None
        self.z: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: H = None
        self.y: F = None
        self.s: A = None
        self.w: A = None
        self.v: A = None
        self.z: H = None
        self.o: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.v: I = None
        self.z: B = None
        self.y: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: C = None
        self.o: J = None
        self.p: H = None
        self.v: J = None
        self.s: H = None
        self.r: E = None
        self.y: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: F = None
        self.r: E = None
        self.p: I = None
        self.u: A = None
        self.txt = txt

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

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