Example

Input

5 3
4
2
5


Output

5
2
4
1
3
#define _CRT_SECURE_NO_WARNINGS
#include<iostream>
#include<sstream>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<climits>
#include<cmath>
#include<string>
#include<vector>
#include<set>
#include<map>
#include<queue>
#include<numeric>
#include<functional>
#include<algorithm>
#include<bitset>
#include<tuple>
#include<unordered_set>
#include<random>
#include<array>
#include<cassert>
using namespace std;
#define INF (1<<29)
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define all(v) v.begin(),v.end()
#define uniq(v) v.erase(unique(all(v)),v.end())


bool s[200001];
int e[100000];

int main() {
	ios::sync_with_stdio(0);
	cin.tie(0);

	int n, m;
	cin >> n >> m;
	rep(i, m)cin >> e[i], e[i]--;
	for (int i = m - 1; i >= 0;i--) {
		if (!s[e[i]]) {
			cout << e[i]+1 << endl;
			s[e[i]] = true;
		}
	}
	rep(i,n) {
		if (!s[i]) {
			cout << i + 1 << endl;
		}
	}


	return 0;
}