Example

Input

5 3
4
2
5


Output

5
2
4
1
3
#include "bits/stdc++.h"
#define sz(x) ((int)(x).size())
#define rep(i,b,c) for(int i=b;i<=c;i++)
#define rev(i,b,c) for(int i=b;i>=c;i--)
#define all(v) v.begin(),v.end()
#define clr(a,b) memset((a), (b), sizeof(a))
#define mp make_pair
using namespace std;
typedef long long ll; typedef pair<int, int> ii; typedef vector<int> vi; typedef vector<ii> vii;
const ll inf = (int)1e9 - 1;//2^18 = 262144 , 2^20 ~ 1e7, //262143 -- 1e5 + 1
const int N = ((int)1e5 + 10), K = 70000, mod = int(1e9) + 7;
const double eps = 1e-9;
inline void in(){
	ios_base::sync_with_stdio(0); cin.tie(0);
#ifdef Srinu73
	freopen("input.txt", "r", stdin);
#endif
}
template <class T> T modexp(T a, T b, T c){ T ans = 1; while (b){ if (b & 1)ans = (ans*a) % c; a = (a*a) % c; b >>= 1; }return ans; }
template <class T> T C(T n, T r){ r = min(r, n - r); T ans = 1; for (T i = 1; i <= r; i++){ ans *= (n - r + i); ans /= i; }return ans; }
map<int,int>ma;
vector<int>v;
int main()
{
	in();
	int n, m;
	cin >> n>>m;
	rep(i, 0, m - 1){
		int x; cin >> x;
		v.push_back(x);
	}
	reverse(all(v));
	for (int x : v){
		if (ma[x]) continue;
		else ma[x]++, cout << x << endl;
	}
	rep(i, 1, n) if (ma[i] == 0) cout << i << endl;
}