class A:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.q: D = None
        self.x: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.s: A = None
        self.r: G = None
        self.p: I = None
        self.x: B = None
        self.w: J = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.p: A = None
        self.o: I = None
        self.u: J = None
        self.w: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: H = None
        self.x: J = None
        self.t: C = None
        self.v: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: E = None
        self.w: C = None
        self.q: B = None
        self.o: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: E = None
        self.s: B = None
        self.u: H = None
        self.w: H = None
        self.r: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.q: D = None
        self.x: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.s: A = None
        self.r: G = None
        self.p: I = None
        self.x: B = None
        self.w: J = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.p: A = None
        self.o: I = None
        self.u: J = None
        self.w: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: H = None
        self.x: J = None
        self.t: C = None
        self.v: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: E = None
        self.w: C = None
        self.q: B = None
        self.o: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: E = None
        self.s: B = None
        self.u: H = None
        self.w: H = None
        self.r: D = None
        self.txt = txt

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

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