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

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.q: H = None
        self.z: I = None
        self.v: A = None
        self.w: C = None
        self.s: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: I = None
        self.p: G = None
        self.y: E = None
        self.z: E = None
        self.r: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.p: H = None
        self.z: F = None
        self.x: D = None
        self.r: G = None
        self.y: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.w: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: E = None
        self.r: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: C = None
        self.p: J = None
        self.v: C = None
        self.x: E = None
        self.r: C = None
        self.o: F = None
        self.t: E = None
        self.z: J = None
        self.s: E = None
        self.y: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: B = None
        self.y: F = None
        self.v: F = None
        self.s: D = None
        self.u: A = None
        self.x: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.q: H = None
        self.z: I = None
        self.v: A = None
        self.w: C = None
        self.s: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: I = None
        self.p: G = None
        self.y: E = None
        self.z: E = None
        self.r: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.p: H = None
        self.z: F = None
        self.x: D = None
        self.r: G = None
        self.y: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.w: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: E = None
        self.r: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: C = None
        self.p: J = None
        self.v: C = None
        self.x: E = None
        self.r: C = None
        self.o: F = None
        self.t: E = None
        self.z: J = None
        self.s: E = None
        self.y: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: B = None
        self.y: F = None
        self.v: F = None
        self.s: D = None
        self.u: A = None
        self.x: C = None
        self.txt = txt

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

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