Example

Input

5 3
4
2
5


Output

5
2
4
1
3
#include <iostream>
#include <cstring>
#include <stack>

using namespace std;

int main(){
	int n, m;
	cin >> n >> m;
	stack<int> st;
	int table[200001] = {};
	for(int i = 0;i < m;i++){
		int temp;
		cin >> temp;
		st.push(temp);
	}
	while(st.size()){
		int temp = st.top();
		st.pop();
		if(table[temp] == 0){
			cout << temp << endl;
			table[temp] = 1;
		}
	}
	for(int i = 1;i <= n;i++){
		if(table[i] == 0){
			cout << i << endl;
		}
	}
}