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

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.u: F = None
        self.v: J = None
        self.y: I = None
        self.q: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.v: F = None
        self.s: H = None
        self.z: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: J = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.o: H = None
        self.y: J = None
        self.p: I = None
        self.t: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: B = None
        self.t: F = None
        self.r: G = None
        self.q: D = None
        self.s: C = None
        self.y: F = None
        self.o: D = None
        self.v: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.u: F = None
        self.v: J = None
        self.y: I = None
        self.q: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.v: F = None
        self.s: H = None
        self.z: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: J = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.o: H = None
        self.y: J = None
        self.p: I = None
        self.t: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: B = None
        self.t: F = None
        self.r: G = None
        self.q: D = None
        self.s: C = None
        self.y: F = None
        self.o: D = None
        self.v: C = None
        self.txt = txt

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

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

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