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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: B = None
        self.y: J = None
        self.o: F = None
        self.p: A = None
        self.x: I = None
        self.r: J = None
        self.z: F = None
        self.t: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: E = None
        self.z: A = None
        self.t: C = None
        self.o: A = None
        self.p: C = None
        self.y: J = None
        self.txt = txt

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

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: B = None
        self.y: J = None
        self.o: F = None
        self.p: A = None
        self.x: I = None
        self.r: J = None
        self.z: F = None
        self.t: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: E = None
        self.z: A = None
        self.t: C = None
        self.o: A = None
        self.p: C = None
        self.y: J = None
        self.txt = txt

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

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

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