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

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.x: C = None
        self.t: G = None
        self.v: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.s: A = None
        self.x: G = None
        self.r: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: A = None
        self.u: J = None
        self.y: E = None
        self.w: C = None
        self.o: E = None
        self.z: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: I = None
        self.x: A = None
        self.s: B = None
        self.u: B = None
        self.r: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.y: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: J = None
        self.y: A = None
        self.o: E = None
        self.q: B = None
        self.r: A = None
        self.u: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: F = None
        self.z: D = None
        self.x: E = None
        self.s: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.x: C = None
        self.t: G = None
        self.v: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.s: A = None
        self.x: G = None
        self.r: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: A = None
        self.u: J = None
        self.y: E = None
        self.w: C = None
        self.o: E = None
        self.z: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: I = None
        self.x: A = None
        self.s: B = None
        self.u: B = None
        self.r: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.y: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: J = None
        self.y: A = None
        self.o: E = None
        self.q: B = None
        self.r: A = None
        self.u: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: F = None
        self.z: D = None
        self.x: E = None
        self.s: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: H = None
        self.txt = txt

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

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