import java.util.HashMap;
import java.util.Scanner;

/**

  • 作者:李涵林

  • /
    public class Main26 {

    public static void main(String[] args) {

      Scanner scanner = new Scanner(System.in);
    
      outer:while (scanner.hasNext()) {
          String nextLine = scanner.nextLine();
          char[] chars = nextLine.toCharArray();
          HashMap<Character, Integer> hashMap = new HashMap();
          for (int i = 0; i < chars.length; i++) {
              char aChar = chars[i];
              if (hashMap.containsKey(aChar)) {
                  hashMap.put(aChar, hashMap.get(aChar) + 1);
              } else {
                  hashMap.put(aChar, 1);
              }
          }
    
          for (int i = 0; i < chars.length; i++) {
              char aChar = chars[i];
              if (hashMap.get(aChar) == 1) {
                  System.out.println(aChar);
                  continue outer;
              }
          }
          System.out.println(-1);
      }

    }
    }