// code for ABCHeck question import java.util.*; import java.io.*; class Main { public static String ABCheck(String str) { str = str.toLowerCase(); // Make case insensitive for (int i = 0; i < str.length() - 4; i++) { if ((str.charAt(i) == 'a' && str.charAt(i + 4) == 'b') || (str.charAt(i) == 'b' && str.charAt(i + 4) == 'a')) { return "true"; } } return "false"; } public static void main(String[] args) { Scanner s = new Scanner(System.in); System.out.print(ABCheck(s.nextLine())); } }