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

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

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.o: J = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: A = None
        self.q: I = None
        self.y: E = None
        self.w: B = None
        self.u: F = None
        self.s: G = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.u: A = None
        self.x: G = None
        self.o: C = None
        self.txt = txt

k = A("k")
g = B("g")
l = C("l")
b = D("b")
j = E("j")
c = F("c")
n = G("n")
a = H("a")
m = I("m")
d = J("d")

k.z = d
g.o = c
g.r = n
g.w = b
g.z = l
g.p = d
g.s = j
l.w = c
l.o = d
b.p = d
b.v = k
b.r = l
j.s = l
c.r = n
n.t = m
n.y = m
n.s = g
n.o = l
n.w = k
a.x = k
a.q = m
a.y = j
a.w = g
a.u = c
a.s = n
m.x = n
m.s = d
m.w = j
m.z = j
m.p = b
m.o = g
m.v = g
m.q = k
m.u = l
d.u = k
d.x = n
d.o = l
assert j.s.w.r.o.txt == "
class A:
    def __init__(self, txt: str):
        self.z: J = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.o: J = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: A = None
        self.q: I = None
        self.y: E = None
        self.w: B = None
        self.u: F = None
        self.s: G = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.u: A = None
        self.x: G = None
        self.o: C = None
        self.txt = txt

k = A("k")
g = B("g")
l = C("l")
b = D("b")
j = E("j")
c = F("c")
n = G("n")
a = H("a")
m = I("m")
d = J("d")

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