public static void main(String[] args) {
Scanner in = new Scanner(new BufferedInputStream(System.in));
while (in.hasNext()) {
int n = in.nextInt();
int m = in.nextInt();
if (n == 0 && m == 0)
break;
int[] arr = new int[n + 1];
arr[n] = m;
for (int i = 0; i < n; i++) {
arr[i] = in.nextInt();
}
Arrays.sort(arr);
for (int j = 0; j < arr.length; j++) {
if (j != arr.length - 1)
System.out.print(arr[j] + " ");
else
System.out.println(arr[j]);
}
}
}
}