text: Input The first line contains an integer t (1 ≤ t ≤ 1000).Then t test cases follow.Before each test case, there is an empty line.Each test case contains three lines.The first line contains three integers k, n, m (0 ≤ k ≤ 100, 1 ≤ n, m ≤ 100) — the initial number of lines in file and lengths of Monocarp's and Polycarp's sequences of changes respectively.The second line contains n integers a_1, a_2, ..., a_n (0 ≤ a_i ≤ 300).The third line contains m integers b_1, b_2, ..., b_m (0 ≤ b_j ≤ 300).Output For each test case print any correct common sequence of Monocarp's and Polycarp's actions of length n + m or -1 if such sequence doesn't exist.Example Input 5 3 2 2 2 0 0 5 4 3 2 2 0 5 0 6 0 2 2 1 0 2 3 5 4 4 6 0 8 0 0 7 0 9 5 4 1 8 7 8 0 0 Output 2 0 0 5 0 2 0 6 5 -1 0 6 0 7 0 8 0 9 -1 # Solution import java.io.OutputStream; import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.util.*; import java.io.IOException; import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.InputStream; public class java1 { public static void main(String[] args) { InputStream inputStream = System.in; OutputStream outputStream = System.out; InputReader in = new InputReader(inputStream); PrintWriter out = new PrintWriter(outputStream); TaskB solver = new TaskB(); solver.solve(1, in, out); out.close(); } static class TaskB { public void solve(int testNumber, InputReader in, PrintWriter out) { int t=in.nextInt(); outer: while(t-- >0) { int k=in.nextInt(); int n=in.nextInt(); int m=in.nextInt(); int na[]=in.inputarInt(n); int A=0; int ma[]=in.inputarInt(m); int B=0; int ans[]=new int[n+m]; for(int x=1;x<=n+m;x++) { if(A<=n-1 && na[A]==0) { ans[x-1]=0; A++; k++; } else if(B<=m-1 &&ma[B]==0) { ans[x-1]=0; k++; B++; } else if(A<=n-1 && B<= m-1) { if(na[A] <=ma[B]) { if(na[A] <=k) { ans[x-1]=na[A]; A++; } else { out.println("-1"); continue outer; } } else { if(ma[B] <=k) { ans[x-1]=ma[B]; B++; } else { out.