//哈希方法 
import java.util.*;
import java.io.*;
public class Main{
    public static void main(String[] args) throws IOException{
        BufferedReader bf=new BufferedReader(new InputStreamReader(System.in));
        String s=null;
        while((s=bf.readLine())!=null){
            char chars[]=s.toCharArray();
            int hash[]=new int[26];
            int a=0;
            for(int i=0;i<chars.length;i++){
                a=chars[i]-'a';
                hash[a]=hash[a]+1;
            }
            StringBuilder sb=new StringBuilder();
            int flag=0;
            for(int i=0;i<hash.length;i++){
                if(hash[i]==1) {
                    char c=(char)(i+97);
                    sb.append(c);
                    flag=1;
                }
            }
            if(flag==0)
                System.out.println(-1);
            int flag1=0;
            for(int i=0;i<chars.length;i++){
                for(int j=0;j<sb.length();j++){
                    if(chars[i]==sb.charAt(j)){
                        System.out.println(chars[i]);
                        flag1=1;
                        break;
                    }
                }
                if(flag1==1)
                    break;
            }
        }
    }
}