/*get no of inputs from the user and print the values of that are repeated odd no of times*/
#include<stdio.h>
int main(){
    int n[30],fre[100]={0};
    int h;
    scanf("%d",&h);
    if(h<0){
         printf("Invalid input");
         return 0;
    }
    for(int i=0;i<h;i++){
        printf("%d ",n[i]);
        if(n[i]<0){
            printf("Invalid input");
            return 0;
        }
        fre[n[i]]++;
    }
    int found=0;
    for(int i=0;i<100;i++){
        if(fre[i]%2==1){
            printf("%d",i);
            found=1;
        }
    }
    if(found==0){
        printf("-1");
    }
    return 0;
}
    
}