class A:
    def __init__(self, txt: str):
        self.q: J = None
        self.o: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: J = None
        self.x: A = None
        self.s: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.o: F = None
        self.x: F = None
        self.t: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: C = None
        self.q: A = None
        self.u: H = None
        self.p: E = None
        self.w: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: D = None
        self.t: J = None
        self.w: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: J = None
        self.x: A = None
        self.s: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.o: F = None
        self.x: F = None
        self.t: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: C = None
        self.q: A = None
        self.u: H = None
        self.p: E = None
        self.w: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: D = None
        self.t: J = None
        self.w: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

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

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

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

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