Example

Input

5 3
4
2
5


Output

5
2
4
1
3
//#define __USE_MINGW_ANSI_STDIO 0
#include <bits/stdc++.h>

using namespace std;
typedef long long ll;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<ll> VL;
typedef vector<VL> VVL;
typedef pair<int, int> PII;

#define FOR(i, a, n) for (ll i = (ll)a; i < (ll)n; ++i)
#define REP(i, n) FOR(i, 0, n)
#define ALL(x) x.begin(), x.end()
#define MP make_pair
#define PB push_back
#define MOD 1000000007
#define INF (1LL<<30)
#define LLINF (1LL<<60)
#define PI 3.14159265359
#define EPS 1e-12
//#define int ll

int e[100010], f[200010] = {false};
signed main(void)
{
	int n, m;
	cin >> n >> m;
	REP(i, m) cin >> e[i];

	VI ans;
	for(int i=m-1; i>=0; --i) {
		if(!f[e[i]]) ans.PB(e[i]);
		//cout << e[i] << " ";
		f[e[i]] = true;
	}
	//cout << endl;

	FOR(i, 1, n+1) {
		if(!f[i]) {
			ans.PB(i);
			//cout << i << " ";
		}
	}
	//cout << endl;
	for(int i: ans) cout << i << endl;

	return 0;
}