//
//  main.c
//  ACM-ICPC2016TSUKUBA
//
//  Created by x15071xx on 2016/10/18.
//  Copyright ?? 2016??´ AIT. All rights reserved.
//

#include <stdio.h>

void swap(int *a,int *b,int *c, int *d){
    int tmp;
    
    tmp = *a;
    *a = *b;
    *b = tmp;
    
    tmp = *c;
    *c = *d;
    *d = tmp;
}

/* ?????????????????????????????? */
void QSort(int x[], int left, int right,int y[])
{
    int i, j;
    int pivot;
    
    i = left;                      /* ???????????????????????????????°???????????´?????????? */
    j = right;                     /* ????????????????????????????????§??????????´?????????? */
    
    pivot = x[(left + right) / 2]; /* ??????????????????????????????????????¨??? */
    
    while (1) {                    /* ??????????????? */
        
        while (x[i] < pivot)       /* pivot ????????§???????????? */
            i++;                   /* ???????????§ i ????¢????????????? */
        
        while (pivot < x[j])       /* pivot ???????°????????????? */
            j--;                   /*  ???????????§ j ???????°?????????? */
        if (i >= j)                /* i >= j ?????? */
            break;                 /* ?????????????????????????????? */
        
        swap(&x[i], &x[j],&y[i], &y[j]);             /* x[i] ??¨ x[j]????????? */
        i++;                       /* ?¬????????????? */
        j--;
    }
    //ShowData(x, 10);               /* ?????????????????¨??? */
    
    if (left < i - 1)              /* ?????????????????? 2 ??\???????´????????????° */
        QSort(x, left, i - 1,y);     /* ??????????????? Q ??????????????? */
    if (j + 1 <  right)            /* ?????????????????? 2 ??\???????´????????????° */
        QSort(x, j + 1, right,y);    /* ??????????????? Q ??????????????? */
}




int main(int argc, const char * argv[]) {
    
    int i,j;
    int n,m;
    int data[200000];
    int data2[200000];
    int data_m;
    scanf("%d %d",&n,&m);
    
    for (i = 0; i < n; i++) {
        data[i] = i+1;
        data2[i] = i+1;
    }
    
    for (i = 0; i < m; i++) {
        scanf("%d",&data_m);
        
        data[data_m-1] = 1;
        
        for (j = 0; j < n; j++) {
            if (data_m-1 != j) {
                data[j]++;
            }
        }
    }
    
    QSort(data, 0, n-1,data2);
    
    for (i = 0 ; i < n; i++) {
        printf("%d\n",data2[i]);
    }
    return 0;
}