Remove the duplicates from a list of integers, keeping the last ( rightmost ) occurrence of each element. The task suggestion was provided by codewars.com