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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: G = None
        self.q: B = None
        self.y: A = None
        self.t: A = None
        self.u: H = None
        self.v: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: D = None
        self.u: A = None
        self.r: I = None
        self.x: A = None
        self.w: C = None
        self.s: D = None
        self.o: C = None
        self.y: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: G = None
        self.z: J = None
        self.p: F = None
        self.s: E = None
        self.txt = txt

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: G = None
        self.q: B = None
        self.y: A = None
        self.t: A = None
        self.u: H = None
        self.v: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: D = None
        self.u: A = None
        self.r: I = None
        self.x: A = None
        self.w: C = None
        self.s: D = None
        self.o: C = None
        self.y: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: G = None
        self.z: J = None
        self.p: F = None
        self.s: E = None
        self.txt = txt

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

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

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

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