import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int state = 0; int input = sc.nextInt(); while (input < 2 && input > -1) { if (input == 1) { if (state == 0) { state = 1; } else if (state == 1) { state = 0; } else if (state == 2) { state = 3; } else { state = 2; } } else { if (state == 0) { state = 3; } else if (state == 1) { state = 2; } else if (state == 2) { state = 1; } else { state = 0; } } input = sc.nextInt(); } if (state == 0) { System.out.print("accepted."); } else { System.out.print("rejected."); } } }