import numpy as np
def matrixTranspose(a, at):
    m = a[0][1]
    t = a[0][2]
    at[0][0] = a[0][1] #Set thr row
    at[0][1] = a[0][0] #Set the column
    at[0][2] = a[0][2] #number of none zero
    k = 1
    for i in range(m):
        for j in range(1,t + 1):
            if (i == a[j][1]):
                at[k][0] = a[j][1]
                at[k][1] = a[j][0]
                at[k][2] = a[j][2]
                k = k + 1