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

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

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.t: E = None
        self.x: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.p: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: I = None
        self.w: J = None
        self.s: J = None
        self.q: D = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.o: I = None
        self.v: C = None
        self.x: A = None
        self.s: H = None
        self.y: D = None
        self.t: D = None
        self.q: H = None
        self.u: C = None
        self.z: I = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.t: E = None
        self.x: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.p: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: I = None
        self.w: J = None
        self.s: J = None
        self.q: D = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.o: I = None
        self.v: C = None
        self.x: A = None
        self.s: H = None
        self.y: D = None
        self.t: D = None
        self.q: H = None
        self.u: C = None
        self.z: I = None
        self.txt = txt

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

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