#include <stdio.h>

int main(int argc, const char * argv[]) {
    int reg = 99999;
    int i,j;
    int n,m;
    int data[300000];
    int data_m[100000];
    scanf("%d %d",&n,&m);
    
    for (i = 0; i < m; i++) {
        scanf("%d",&data_m[i]);
    }
    
    for (i = 0; i < n; i++) {
        data[i+reg] = i+1;
    }
    
    for (i = 0; i < m; i++) {
        
        for (j = reg-1-i; j < reg+n; j++) {
            
            if (data_m[i] == data[j]) {
                //???????????£?????????
                data[reg-1 - i] = data[j];
                data[j] = 0;
            }
        }
    }
    
    for (i = reg - m+1 ; i < reg+n; i++) {
        if (data[i] != 0) {
            printf("%d\n",data[i]);
        }
    }
    return 0;
}