Example

Input

5 3
4
2
5


Output

5
2
4
1
3
#include<cstdio>
#include<iostream>
#include<cstring>
#include<vector>
#include<queue>
#include<set>
#include<cmath>
#include<algorithm>
#include<map>
#include<cstdlib>
#include<stack>
#include<sstream>
#include<string>
#include<cassert>
#include<ctime>
#include<functional>
#include<deque>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
const int INF = 0x3f3f3f3f;
const double PI = acos(-1.0);
int kase = 0;
int n, m;
const double eps = 1e-10;
stack<int> s;
const int maxn = 200020;
int a[maxn];

int main()
{
	while (cin >> n >> m)
	{
		memset(a, 0, sizeof(a));
		for (int i = 0; i < m; i++)
		{
			int tmp;
			scanf("%d", &tmp);
			s.push(tmp);
		}
		while (!s.empty())
		{
			int tmp = s.top();
			s.pop();
			if (a[tmp] == 0)
			{
				printf("%d\n", tmp);
				a[tmp] = 1;
			}
		}
		for (int i = 1; i <= n; i++)
			if (a[i] == 0)
				printf("%d\n", i);

	}
}