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

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.w: G = None
        self.s: F = None
        self.o: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.t: C = None
        self.s: I = None
        self.z: C = None
        self.w: B = None
        self.u: A = None
        self.txt = txt

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.w: G = None
        self.s: F = None
        self.o: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.t: C = None
        self.s: I = None
        self.z: C = None
        self.w: B = None
        self.u: A = None
        self.txt = txt

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

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

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

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

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

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

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