By swapping s and t when filling the matrix, we obtain the same (and correct) effect. Still, not very satisfying code.