The input contains exactly one test case. The first line of input contains three positive integers n, k
and m
. Then follow n lines each containing n nonnegative integers below 32,768, giving A’s elements in row-major order.
Output the elements of S modulo m in the same way as A is given.