//
//  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 tmp;
    
    tmp = *a;
    *a = *b;
    *b = tmp;
}

int main(int argc, const char * argv[]) {
    
    int i,j;
    int n,m;
    int data[200];
    int data2[200];
    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]++;
            }
        }
    }
    
    for (i = 0; i < n-1; i++) {
        for (j = n-1; j > i; j--) {
            if (data[j] < data[j-1]) {
                swap(&data[j], &data[j-1]);
                swap(&data2[j], &data2[j-1]);
            }
        }
    }
    
    for (i = 0 ; i < n; i++) {
        printf("%d\n",data2[i]);
    }
    return 0;
}