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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: H = None
        self.x: J = None
        self.o: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: J = None
        self.v: A = None
        self.p: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: A = None
        self.o: F = None
        self.t: A = None
        self.y: J = None
        self.txt = txt

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

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: H = None
        self.x: J = None
        self.o: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: J = None
        self.v: A = None
        self.p: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: A = None
        self.o: F = None
        self.t: A = None
        self.y: J = None
        self.txt = txt

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

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

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

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

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