class A:
    def __init__(self, txt: str):
        self.s: B = None
        self.q: D = None
        self.p: I = None
        self.v: G = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: G = None
        self.y: F = None
        self.r: A = None
        self.s: H = None
        self.o: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: H = None
        self.q: B = None
        self.v: A = None
        self.w: H = None
        self.u: B = None
        self.x: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: D = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: G = None
        self.y: F = None
        self.r: A = None
        self.s: H = None
        self.o: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: H = None
        self.q: B = None
        self.v: A = None
        self.w: H = None
        self.u: B = None
        self.x: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: D = None
        self.txt = txt

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

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

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