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

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

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.t: A = None
        self.z: A = None
        self.p: E = None
        self.v: F = None
        self.w: E = None
        self.s: E = None
        self.r: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.q: H = None
        self.r: G = None
        self.s: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: J = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: C = None
        self.y: C = None
        self.w: F = None
        self.s: F = None
        self.t: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

f = A("f")
i = B("i")
m = C("m")
e = D("e")
k = E("k")
n = F("n")
h = G("h")
b = H("b")
d = I("d")
j = J("j")

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

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

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.t: A = None
        self.z: A = None
        self.p: E = None
        self.v: F = None
        self.w: E = None
        self.s: E = None
        self.r: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.q: H = None
        self.r: G = None
        self.s: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: J = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: C = None
        self.y: C = None
        self.w: F = None
        self.s: F = None
        self.t: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

f = A("f")
i = B("i")
m = C("m")
e = D("e")
k = E("k")
n = F("n")
h = G("h")
b = H("b")
d = I("d")
j = J("j")

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