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

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: J = None
        self.p: D = None
        self.v: G = None
        self.z: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.o: E = None
        self.x: G = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.o: C = None
        self.u: B = None
        self.x: J = None
        self.p: J = None
        self.y: B = None
        self.w: G = None
        self.q: B = None
        self.r: J = None
        self.z: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: B = None
        self.y: A = None
        self.r: G = None
        self.p: D = None
        self.t: C = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: J = None
        self.p: D = None
        self.v: G = None
        self.z: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.o: E = None
        self.x: G = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.o: C = None
        self.u: B = None
        self.x: J = None
        self.p: J = None
        self.y: B = None
        self.w: G = None
        self.q: B = None
        self.r: J = None
        self.z: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: B = None
        self.y: A = None
        self.r: G = None
        self.p: D = None
        self.t: C = None
        self.txt = txt

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

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