#include <stdio.h>
int main(){
    int N;
    scanf("%d" ,&N);
    if(N<=0){
        printf("Invalid Input");
        return 0;
}
int stack[10];
int top=-1;
for(int i=0;i<n;i++){
    int x;
    scanf("%d",&x);
    int found=0;
    for(int j=0;j<=top;j++){
        if(stack[j]==x){
            found=1;
            break;
        }
    }
    if(!found){
        stack[++top]=x;
        
    }
}
for(int i=0;i<=top;i++){
    printf("%d\n",stack[i]);
}
return 0;
}