class A:
    def __init__(self, txt: str):
        self.q: J = None
        self.y: J = None
        self.z: E = None
        self.v: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: I = None
        self.s: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.s: A = None
        self.p: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: J = None
        self.p: H = None
        self.y: F = None
        self.o: G = None
        self.z: G = None
        self.w: H = None
        self.s: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: I = None
        self.v: H = None
        self.q: D = None
        self.r: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: C = None
        self.p: B = None
        self.u: A = None
        self.o: B = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.z: G = None
        self.v: A = None
        self.s: B = None
        self.q: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: I = None
        self.s: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.s: A = None
        self.p: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: J = None
        self.p: H = None
        self.y: F = None
        self.o: G = None
        self.z: G = None
        self.w: H = None
        self.s: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: I = None
        self.v: H = None
        self.q: D = None
        self.r: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: C = None
        self.p: B = None
        self.u: A = None
        self.o: B = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.z: G = None
        self.v: A = None
        self.s: B = None
        self.q: G = None
        self.txt = txt

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

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