// AOJ 1367: Rearranging a Sequence
// 2017.10.9 bal4u@uu

#include <stdio.h>
#include <stdlib.h>

typedef struct { int id, a; } T;
T tbl[200002];

int cmp(T *a, T *b) { return b->id - a->id; }

int main()
{
	int n, m, i, j;
	register T *p;

	scanf("%d%d", &n, &m);
	for (p = tbl+1, j = n, i = 1; i <= n; i++, p++) p->id = j--, p->a = i;
	while (m-- > 0) {
		scanf("%d", &j);
		tbl[j].id = i++;
	}
	qsort(tbl+1, n, sizeof(T), cmp);
	for (p = tbl+1, i = 1; i <= n; i++, p++) printf("%d\n", p->a);
	return 0;
}