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

class B:
    def __init__(self, txt: str):
        self.s: J = None
        self.x: D = None
        self.v: H = None
        self.r: D = None
        self.q: I = None
        self.o: I = None
        self.w: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: J = None
        self.q: J = None
        self.w: I = None
        self.r: E = None
        self.u: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: J = None
        self.q: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.v: E = None
        self.p: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: F = None
        self.p: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: I = None
        self.q: J = None
        self.p: D = None
        self.s: A = None
        self.z: E = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.u: B = None
        self.y: I = None
        self.x: D = None
        self.r: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: J = None
        self.x: D = None
        self.v: H = None
        self.r: D = None
        self.q: I = None
        self.o: I = None
        self.w: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: J = None
        self.q: J = None
        self.w: I = None
        self.r: E = None
        self.u: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: J = None
        self.q: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.v: E = None
        self.p: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: F = None
        self.p: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: I = None
        self.q: J = None
        self.p: D = None
        self.s: A = None
        self.z: E = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.u: B = None
        self.y: I = None
        self.x: D = None
        self.r: B = None
        self.txt = txt

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

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