#include<stdio.h>
#include<string.h>
#define SIZE 1001
int main()
{
char a[SIZE];
int i = 0, j = 0,cnt = 0, k = 0;
int x = 0;
while(scanf("%s",a) != EOF){
// x = strlen(a);
for(i = 0; i<strlen(a);i++){
for(j =0; j <strlen(a);j++){
if(a[i] == a[j])
cnt++;
else
continue;
}
if(cnt == 1 && k == 0){
printf("%c\n",a[i]);
k++;
}
else
cnt = 0;
}
if(k == 0)
printf("-1\n");
else
k = 0;
}
return 0;
}
#include<string.h>
#define SIZE 1001
int main()
{
char a[SIZE];
int i = 0, j = 0,cnt = 0, k = 0;
int x = 0;
while(scanf("%s",a) != EOF){
// x = strlen(a);
for(i = 0; i<strlen(a);i++){
for(j =0; j <strlen(a);j++){
if(a[i] == a[j])
cnt++;
else
continue;
}
if(cnt == 1 && k == 0){
printf("%c\n",a[i]);
k++;
}
else
cnt = 0;
}
if(k == 0)
printf("-1\n");
else
k = 0;
}
return 0;
}