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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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