class A:
    def __init__(self, txt: str):
        self.z: H = None
        self.s: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.q: G = None
        self.u: B = None
        self.y: J = None
        self.p: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.y: H = None
        self.p: J = None
        self.s: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: J = None
        self.x: H = None
        self.v: A = None
        self.r: E = None
        self.y: C = None
        self.p: B = None
        self.w: A = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.w: B = None
        self.o: B = None
        self.u: D = None
        self.v: D = None
        self.r: I = None
        self.s: C = None
        self.txt = txt

m = A("m")
f = B("f")
n = C("n")
d = D("d")
k = E("k")
l = F("l")
h = G("h")
j = H("j")
c = I("c")
i = J("i")

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

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

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

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.q: G = None
        self.u: B = None
        self.y: J = None
        self.p: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.y: H = None
        self.p: J = None
        self.s: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: J = None
        self.x: H = None
        self.v: A = None
        self.r: E = None
        self.y: C = None
        self.p: B = None
        self.w: A = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.w: B = None
        self.o: B = None
        self.u: D = None
        self.v: D = None
        self.r: I = None
        self.s: C = None
        self.txt = txt

m = A("m")
f = B("f")
n = C("n")
d = D("d")
k = E("k")
l = F("l")
h = G("h")
j = H("j")
c = I("c")
i = J("i")

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