Given an array A of size N. The elements of the array consists of positive integers. You have to find the largest element with minimum frequency.
Input Format: First line of input contains number of testcases T. For each testcase there will be two lines. First line contains N, next line contains N elements separated by spaces.
Output Format: For each testcase, print the largest element with minimum frequency.
User Task: Your task is to complete the provided function LargButMinFreq(A, n) which accepts array A and n. Hence you have to return the largest element with minimum frequency.