import java.util.*; import java.io.*; import static java.util.Arrays.*; import static java.lang.Math.*; public class No180 { static final Scanner in = new Scanner(System.in); static final PrintWriter out = new PrintWriter(System.out,false); static void solve() { n = in.nextInt(); a = new int[n]; b = new int[n]; for (int i=0; i f(x)) l = x; else r = x; } out.println(l); } static int n; static int[] a, b; static long f(long x) { if (x <=0) return Long.MAX_VALUE; long max = Long.MIN_VALUE; long min = Long.MAX_VALUE; for (int i=0; i