I need to generate all tensors $A_{ijk}$ (i.e. array with 3 indices), where $i=0, \ldots, 6$, $j=0, \ldots 6$, $k=0, \ldots 5$, such that only integer numbers $-1$, $0$ and $1$ could be used as entries. There are $665*3$ such possibilities. What would be the shortest system of embedded loop for this in SAGE? I just started using SAGE and don't have any previous experience with Python. The only solution I was able to think of include hundreds of embedded loops.