public static void main(String[] args) {
try (Scanner myObj = new Scanner(System.in)) {
String s = myObj.nextLine();
String ans = "-1";
String[] x = { "a", "b", "c" };
for (String i : x) {
if (s == i) { // не срабатывает
ans = "1";
}
}
System.out.println(ans);
}
}