Read from standard input a natural number n followed by n integers in an array. Find the second-largest distinct value in the array (the one immediately smaller than the maximum).
If all values in the array are equal (or if n = 1), there is no second distinct value and the program should print NU EXISTA.