#include <bits/stdc++.h>
using namespace std;
typedef struct LNode{
struct LNode *next;
int data;
}*LinkList, LNode;
void Print(LinkList L){
LNode *p=L->next;
while(p){
printf("%d ", p->data);
p=p->next;
}
}
void CreateList(LinkList &L, int length){
L = (LNode *)malloc(sizeof(LNode *));
L->next = NULL;
LNode *p=L;
while(length--){
p->next = (LNode *)malloc(sizeof(LNode *));
p = p->next;
p->next = NULL;
scanf("%d", &p->data);
}
}
void DelDouble(LNode *flag){
if(flag->next==NULL){
return;
}
LNode *p = flag, *q = flag->next, *del=NULL;
while(q){
if(q->data == flag->data){
del = q;
q = q->next;
p->next = q;
free(del);
}
else{
p = p->next;
q = q->next;
}
}
}
int main(){
int n;
scanf("%d", &n);
LinkList L;
CreateList(L, n);
LNode *flag = L->next;
while(flag){
DelDouble(flag);
flag = flag->next;
}
Print(L);
}