class A:
    def __init__(self, txt: str):
        self.v: I = None
        self.u: D = None
        self.x: D = None
        self.o: B = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.t: I = None
        self.r: C = None
        self.u: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: G = None
        self.u: A = None
        self.y: B = None
        self.x: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.o: J = None
        self.v: D = None
        self.s: F = None
        self.t: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: E = None
        self.y: J = None
        self.u: C = None
        self.t: B = None
        self.v: B = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.u: B = None
        self.v: D = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.t: I = None
        self.r: C = None
        self.u: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: G = None
        self.u: A = None
        self.y: B = None
        self.x: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.o: J = None
        self.v: D = None
        self.s: F = None
        self.t: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: E = None
        self.y: J = None
        self.u: C = None
        self.t: B = None
        self.v: B = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.u: B = None
        self.v: D = None
        self.txt = txt

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

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