import java.util.Scanner; import java.util.Arrays; public class Main { public static void main(String[] args) { Scanner sc=new Scanner(System.in); int n=sc.nextInt(); int m=sc.nextInt(); int[] array=new int[n]; int[] brray=new int[m]; int[] crray=new int[n+m]; int x=0; while(sc.hasNext()) { crray[x++]=sc.nextInt(); } Arrays.sort(crray); for(int i=0;i<x;i++) { System.out.print(crray[i]+" "); } } }