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

class B:
    def __init__(self, txt: str):
        self.w: H = None
        self.u: H = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.s: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: H = None
        self.u: H = None
        self.x: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.q: I = None
        self.o: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: G = None
        self.o: H = None
        self.s: A = None
        self.q: C = None
        self.v: F = None
        self.u: F = None
        self.w: A = None
        self.r: F = None
        self.y: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: H = None
        self.u: H = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.s: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: H = None
        self.u: H = None
        self.x: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.q: I = None
        self.o: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: G = None
        self.o: H = None
        self.s: A = None
        self.q: C = None
        self.v: F = None
        self.u: F = None
        self.w: A = None
        self.r: F = None
        self.y: C = None
        self.txt = txt

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

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