size = 30

parse arg n
If n < 1 Then Do
    n = 1
End

call mkmatrix size, size, "m1"
call mkmatrix size, size, "m2"
Do While n > 0
    call mmult(size, size, "m1", "m2", "mm")
    n = n - 1
End
say mm.0.0" "mm.2.3" "mm.3.2" "mm.4.4

exit

mkmatrix:
    parse arg rows, cols, mx
    rows = rows - 1
    cols = cols - 1
    count = 1
    Do r = 0 To rows
        Do c = 0 To cols
            interpret mx || ".r.c = " count
            count = count + 1
        End
    End
    return mx

mmult:
    parse arg rows, cols, m1, m2, m3
    rows = rows - 1
    cols = cols - 1
    Do i = 0 To rows
        Do j = 0 To cols
            val = 0
            Do k = 0 To cols
                interpret "val = val + " || m1 || ".i.k * " || m2 || ".k.j"
            End
            interpret m3 || ".i.j = " val
        End
    End