class A:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.t: J = None
        self.q: I = None
        self.y: H = None
        self.z: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: H = None
        self.w: B = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.t: J = None
        self.q: I = None
        self.y: H = None
        self.z: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: H = None
        self.w: B = None
        self.txt = txt

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

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

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

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

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

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