You are given an array 'arr' of 'n' integers.
Your task is to find the first repeating element in the array. The "first" repeating element is the one whose first appearance in the array occurs at the smallest index.
If no element is repeated in the array, your function should return -1.
Input Format:
The first line of input contains an integer 'n', representing the size of the array.
The second line contains 'n' space-separated integers, representing the elements of the array 'arr'.
Output Format:
Print a single integer which is the first repeating element.
If no repeating element is found, print -1.
Note:
The element that repeats and has the minimum index of its first occurrence is the desired answer.