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

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.t: I = None
        self.z: F = None
        self.p: I = None
        self.r: F = None
        self.y: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.u: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: G = None
        self.s: B = None
        self.r: A = None
        self.y: G = None
        self.t: F = None
        self.z: C = None
        self.u: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.t: A = None
        self.x: F = None
        self.p: F = None
        self.y: A = None
        self.v: J = None
        self.z: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: G = None
        self.z: G = None
        self.r: H = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.t: I = None
        self.z: F = None
        self.p: I = None
        self.r: F = None
        self.y: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.u: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: G = None
        self.s: B = None
        self.r: A = None
        self.y: G = None
        self.t: F = None
        self.z: C = None
        self.u: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.t: A = None
        self.x: F = None
        self.p: F = None
        self.y: A = None
        self.v: J = None
        self.z: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: G = None
        self.z: G = None
        self.r: H = None
        self.txt = txt

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

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

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