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

class B:
    def __init__(self, txt: str):
        self.q: G = None
        self.u: H = None
        self.p: E = None
        self.v: F = None
        self.s: G = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.t: I = None
        self.w: I = None
        self.r: B = None
        self.o: H = None
        self.q: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: J = None
        self.u: G = None
        self.t: C = None
        self.s: G = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.v: G = None
        self.t: E = None
        self.w: E = None
        self.u: C = None
        self.r: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: G = None
        self.u: H = None
        self.p: E = None
        self.v: F = None
        self.s: G = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.t: I = None
        self.w: I = None
        self.r: B = None
        self.o: H = None
        self.q: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: J = None
        self.u: G = None
        self.t: C = None
        self.s: G = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.v: G = None
        self.t: E = None
        self.w: E = None
        self.u: C = None
        self.r: E = None
        self.txt = txt

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

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