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

class B:
    def __init__(self, txt: str):
        self.w: J = None
        self.p: C = None
        self.q: E = None
        self.r: H = None
        self.s: J = None
        self.o: J = None
        self.y: C = None
        self.t: I = None
        self.v: I = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.r: A = None
        self.y: C = None
        self.o: B = None
        self.v: F = None
        self.z: B = None
        self.x: C = None
        self.w: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: H = None
        self.v: D = None
        self.z: C = None
        self.w: J = None
        self.p: F = None
        self.y: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: H = None
        self.z: E = None
        self.x: E = None
        self.q: H = None
        self.p: E = None
        self.t: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: E = None
        self.s: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: J = None
        self.p: C = None
        self.q: E = None
        self.r: H = None
        self.s: J = None
        self.o: J = None
        self.y: C = None
        self.t: I = None
        self.v: I = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.r: A = None
        self.y: C = None
        self.o: B = None
        self.v: F = None
        self.z: B = None
        self.x: C = None
        self.w: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: H = None
        self.v: D = None
        self.z: C = None
        self.w: J = None
        self.p: F = None
        self.y: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: H = None
        self.z: E = None
        self.x: E = None
        self.q: H = None
        self.p: E = None
        self.t: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: E = None
        self.s: D = None
        self.txt = txt

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

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