description: You are given a sequence a_1, a_2, ..., a_n consisting of n pairwise distinct positive integers.
  
  Find \left⌊ \frac n 2 \right⌋ different pairs of integers x and y such that: 
  
    * x ≠ y; 
    * x and y appear in a; 
    * x~mod~y doesn't appear in a. 
  
  
  
  Note that some x or y can belong to multiple pairs.
  
  ⌊ x ⌋ denotes the floor function — the largest integer less than or equal to x. x~mod~y denotes the remainder from dividing x by y.
  
  If there are multiple solutions, print any of them. It can be shown that at least one solution always exists.
  
  Input
  
  The first line contains a single integer t (1 ≤ t ≤ 10^4) — the number of testcases.
  
  The first line of each testcase contains a single integer n (2 ≤ n ≤ 2 ⋅ 10^5) — the length of the sequence.
  
  The second line of each testcase contains n integers a_1, a_2, ..., a_n (1 ≤ a_i ≤ 10^6).
  
  All numbers in the sequence are pairwise distinct. The sum of n over all testcases doesn't exceed 2 ⋅ 10^5.
  
  Output
  
  The answer for each testcase should contain \left⌊ \frac n 2 \right⌋ different pairs of integers x and y such that x ≠ y, x and y appear in a and x~mod~y doesn't appear in a. Print the pairs one after another.
  
  You can print the pairs in any order. However, the order of numbers in the pair should be exactly such that the first number is x and the second number is y. All pairs should be pairwise distinct.
  
  If there are multiple solutions, print any of them.
  
  Example
  
  Input
  
  
  4
  2
  1 4
  4
  2 8 3 4
  5
  3 8 5 9 7
  6
  2 7 5 3 4 8
  
  
  Output
  
  
  4 1
  8 2
  8 4
  9 5
  7 5
  8 7
  4 3
  5 2
  
  Note
  
  In the first testcase there are only two pairs: (1, 4) and (4, 1). \left⌊ \frac 2 2 \right⌋=1, so we have to find one pair. 1~mod~4=1, and 1 appears in a, so that pair is invalid. Thus, the only possible answer is a pair (4, 1).
  
  In the second testcase, we chose pairs 8~mod~2=0 and 8~mod~4=0. 0 doesn't appear in a, so that answer is valid. There are multiple possible answers for that testcase.
  
  In the third testcase, the chosen pairs are 9~mod~5=4 and 7~mod~5=2. Neither 4, nor 2, appears in a, so that answer is valid.
solution: import static java.util.Arrays.*;
  
  public class B {
  
  	public Object solve () {
  		int N = sc.nextInt();
  		int [] A = sc.nextInts();
  
  		int r = 0, M = minimum(A);
  		for (int a : A)
  			if (r < N/2 && a != M) {
  				print(a, M);
  				++r;
  			}
  
  		return null;
  	}
  
  	private static final int CONTEST_TYPE = 2;
  
  	private static void init () {
  	}
  
  	private static int minimum (int ... A) { return stream(A).min().getAsInt(); }
  	//////////////////////////////////////////////////////////////////////////////////// OFF
  	private static IOUtils.MyScanner sc = new IOUtils.MyScanner();
  	private static Object print (Object o, Object ... A) { IOUtils.print(o, A); return null; }
  	private static class IOUtils {
  		public static class MyScanner {
  			public String next () { newLine(); return line[index++]; }
  			public int nextInt () { return Integer.parseInt(next()); }
  			public String nextLine () { line = null; return readLine(); }
  			public String [] nextStrings () { return split(nextLine()); }
  			public int [] nextInts () {
  				String [] S = nextStrings(); int N = S.length;
  				int [] res = new int [N];
  				for (int i = 0; i < N; ++i)
  					res[i] = Integer.parseInt(S[i]);
  				return res;
  			}
  			//////////////////////////////////////////////
  			private boolean eol () { return index == line.length; }
  			private String readLine () {
  				try {
  					int b;
  					StringBuilder res = new StringBuilder();
  					while ((b = System.in.read()) < ' ')
  						continue;
  					res.append((char)b);
  					while ((b = System.in.read()) >= ' ')
  						res.append((char)b);
  					return res.toString();
  				} catch (Exception e) {
  					throw new Error (e);
  				}
  			}
  			private MyScanner () {
  				try {
  					while (System.in.available() == 0)
  						Thread.sleep(1);
  					start();
  				} catch (Exception e) {
  					throw new Error(e);
  				}
  			}
  			private String [] line;
  			private int index;
  			private void newLine () {
  				if (line == null || eol()) {
  					line = split(readLine());
  					index = 0;
  				}
  			}
  			private String [] split (String s) { return s.length() > 0 ? s.split(" ") : new String [0]; }
  		}
  		private static String build (Object o, Object ... A) { return buildDelim(" ", o, A); }
  		private static String buildDelim (String delim, Object o, Object ... A) {
  			java.util.List<String> str = new java.util.ArrayList<>();
  			append(str, o);
  			for (Object p : A)
  				append(str, p);
  			return String.join(delim, str.toArray(new String [0]));
  		}
  		//////////////////////////////////////////////////////////////////////////////////
  		private static java.text.DecimalFormat formatter = new java.text.DecimalFormat("#.#########");
  		private static void start () { if (t == 0) t = millis(); }
  		private static void append (java.util.function.Consumer<Object> f, java.util.function.Consumer<Object> g, Object o) {
  			if (o.getClass().isArray()) {
  				int len = java.lang.reflect.Array.getLength(o);
  				for (int i = 0; i < len; ++i)
  					f.accept(java.lang.reflect.Array.get(o, i));
  			}
  			else if (o instanceof Iterable<?>)
  				((Iterable<?>)o).forEach(f::accept);
  			else
  				g.accept(o instanceof Double ? formatter.format(o) : o);
  		}
  		private static void append (java.util.List<String> str, Object o) {
  			append(x -> append(str, x), x -> str.add(x.toString()), o);
  		}
  		private static java.io.PrintWriter pw = new java.io.PrintWriter(System.out);
  		private static void flush () { pw.flush(); System.out.flush(); }
  		private static void print (Object o, Object ... A) {
  			String res = build(o, A);
  			if (DEBUG == 2)
  				err(res, '(', time(), ')');
  			if (res.length() > 0)
  				pw.println(res);
  			if (DEBUG == 1)
  				flush();
  		}
  		private static void err (Object o, Object ... A) { System.err.println(build(o, A)); }
  		private static int DEBUG;
  		private static void exit () {
  			String end = "------------------" + System.lineSeparator() + time();
  			switch(DEBUG) {
  			case 1: print(end); break;
  			case 2: err(end); break;
  			}
  			IOUtils.pw.close();
  			System.out.flush();
  			System.exit(0);
  		}
  		private static long t;
  		private static long millis () { return System.currentTimeMillis(); }
  		private static String time () { return "Time: " + (millis() - t) / 1000.0; }
  		private static void run (int N) {
  			try { DEBUG = Integer.parseInt(System.getProperties().get("DEBUG").toString()); }
  			catch (Throwable t) {}
  
  			for (int n = 1; n <= N; ++n) {
  				Object res = new B().solve();
  				if (res != null) {
  					@SuppressWarnings("all")
  					Object o = CONTEST_TYPE == 0 ? "Case #" + n + ": " + build(res) : res;
  					print(o);
  				}
  			}
  			exit();
  		}
  	}
  	////////////////////////////////////////////////////////////////////////////////////
  	public static void main (String[] args) {
  		@SuppressWarnings("all")
  		int N = CONTEST_TYPE == 1 ? 1 : sc.nextInt();
  		init();
  		IOUtils.run(N);
  	}
  }
  