class A:
    def __init__(self, txt: str):
        self.z: D = None
        self.u: I = None
        self.t: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: I = None
        self.r: D = None
        self.v: G = None
        self.q: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.v: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.s: G = None
        self.r: I = None
        self.z: G = None
        self.o: E = None
        self.p: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: I = None
        self.s: E = None
        self.u: B = None
        self.y: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.v: I = None
        self.w: G = None
        self.p: E = None
        self.r: B = None
        self.x: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.r: E = None
        self.s: D = None
        self.q: I = None
        self.p: A = None
        self.t: G = None
        self.u: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: I = None
        self.r: D = None
        self.v: G = None
        self.q: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.v: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.s: G = None
        self.r: I = None
        self.z: G = None
        self.o: E = None
        self.p: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: I = None
        self.s: E = None
        self.u: B = None
        self.y: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.v: I = None
        self.w: G = None
        self.p: E = None
        self.r: B = None
        self.x: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.r: E = None
        self.s: D = None
        self.q: I = None
        self.p: A = None
        self.t: G = None
        self.u: B = None
        self.txt = txt

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

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