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

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: J = None
        self.v: B = None
        self.p: B = None
        self.r: H = None
        self.w: B = None
        self.x: B = None
        self.z: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.w: I = None
        self.r: H = None
        self.o: G = None
        self.v: B = None
        self.z: B = None
        self.y: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: J = None
        self.v: B = None
        self.p: B = None
        self.r: H = None
        self.w: B = None
        self.x: B = None
        self.z: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.w: I = None
        self.r: H = None
        self.o: G = None
        self.v: B = None
        self.z: B = None
        self.y: C = None
        self.txt = txt

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

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