Example

Input

5 3
4
2
5


Output

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

#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define ITR(x,c) for(__typeof(c.begin()) x=c.begin();x!=c.end();x++)
#define RITR(x,c) for(__typeof(c.rbegin()) x=c.rbegin();x!=c.rend();x++)
#define setp(n) fixed << setprecision(n)

#define lf double
#define ll long long
#define vll vector<ll>
#define vi vector<int>
#define pll pair<ll,ll>
#define pi pair<int,int>

#define all(a) (a.begin()),(a.end())
#define rall(a) (a.rbegin()),(a.rend())
#define fi first
#define se second
#define pb push_back
#define mp make_pair
#define ins insert

using namespace std;

int main(void)
{
	cin.tie(0);
	ios::sync_with_stdio(false);
	bool u[200001];
	rep(i, 200001) u[i] = false;

	int n, m; cin>>n>>m;

	stack<int> st;
	rep(i, m){
		int temp; cin>>temp;
		st.push(temp);
	}
	while(st.size()){
		int p = st.top(); st.pop();
		if (!u[p]){
			cout << p << "\n";
			u[p] = true;
		}
	}

	for(int i=1; i<=n; i++){
		if (!u[i]) cout << i << "\n";
	}
	return 0;
}
