def get_diagonals(arr):
    """returns the diagonals for a given matrix """
    d1, d2 = [], []
    for row in range(len(arr)):
        forwardDiag = arr[row][row]
        d1.append(forwardDiag)
        backwardDiag = arr[row][len(arr[row]) - 1 - row]
        d2.append(backwardDiag)
    return d1, d2