class A:
    def __init__(self, txt: str):
        self.q: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.t: C = None
        self.v: A = None
        self.u: J = None
        self.w: C = None
        self.s: E = None
        self.z: F = None
        self.y: A = None
        self.p: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.o: B = None
        self.r: B = None
        self.w: I = None
        self.y: H = None
        self.z: D = None
        self.v: E = None
        self.p: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.r: J = None
        self.z: G = None
        self.y: C = None
        self.s: B = None
        self.x: F = None
        self.o: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: I = None
        self.x: B = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.t: C = None
        self.v: A = None
        self.u: J = None
        self.w: C = None
        self.s: E = None
        self.z: F = None
        self.y: A = None
        self.p: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.o: B = None
        self.r: B = None
        self.w: I = None
        self.y: H = None
        self.z: D = None
        self.v: E = None
        self.p: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.r: J = None
        self.z: G = None
        self.y: C = None
        self.s: B = None
        self.x: F = None
        self.o: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: I = None
        self.x: B = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

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

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

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