def findTrace(matrix,size):
    """
    This function calculates the trace of a natural latin square.
    """

    trace = 0

    for i in range(size):
        for j in range(size):
            if i==j:
                trace = trace + int(matrix[i][j])
    
    return trace