Given an array of integers nums, where each element occurs thrice, except one which occurs twice. Return the element which repeats twice.