import java.io.*; import java.util.*; public class Main{ public static void main(String[] args){ solve(); } public static void solve(){ Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int[] v = new int[n]; for(int i=0;i