class A:
    def __init__(self, txt: str):
        self.v: E = None
        self.z: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: A = None
        self.q: F = None
        self.s: D = None
        self.u: D = None
        self.x: H = None
        self.w: J = None
        self.r: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: H = None
        self.z: A = None
        self.p: D = None
        self.o: E = None
        self.w: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.w: J = None
        self.s: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: B = None
        self.x: B = None
        self.u: B = None
        self.t: I = None
        self.w: A = None
        self.z: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: I = None
        self.r: G = None
        self.x: G = None
        self.w: C = None
        self.y: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: G = None
        self.w: B = None
        self.t: A = None
        self.r: J = None
        self.y: E = None
        self.x: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: H = None
        self.txt = txt

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

n = A("n")
l = B("l")
c = C("c")
h = D("h")
m = E("m")
i = F("i")
g = G("g")
e = H("e")
d = I("d")
b = J("b")

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

class B:
    def __init__(self, txt: str):
        self.v: A = None
        self.q: F = None
        self.s: D = None
        self.u: D = None
        self.x: H = None
        self.w: J = None
        self.r: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: H = None
        self.z: A = None
        self.p: D = None
        self.o: E = None
        self.w: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.w: J = None
        self.s: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: B = None
        self.x: B = None
        self.u: B = None
        self.t: I = None
        self.w: A = None
        self.z: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: I = None
        self.r: G = None
        self.x: G = None
        self.w: C = None
        self.y: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: G = None
        self.w: B = None
        self.t: A = None
        self.r: J = None
        self.y: E = None
        self.x: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: H = None
        self.txt = txt

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

n = A("n")
l = B("l")
c = C("c")
h = D("h")
m = E("m")
i = F("i")
g = G("g")
e = H("e")
d = I("d")
b = J("b")

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