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

class B:
    def __init__(self, txt: str):
        self.u: G = None
        self.z: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.p: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: J = None
        self.q: B = None
        self.u: A = None
        self.t: I = None
        self.o: F = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.v: C = None
        self.s: G = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: G = None
        self.z: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.p: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: J = None
        self.q: B = None
        self.u: A = None
        self.t: I = None
        self.o: F = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.v: C = None
        self.s: G = None
        self.txt = txt

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

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

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

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