jiahuimbzuai/CoQuIR huggingface dataset:
//  [ruby]
require 'set'

class Hash
  def push(key, value)
    self[key] = [] if self[key] == nil
    self[key].push(value)
  end
end

class Array
  def lower_bound(value)
    left = -1;
    right = self.length;
    while left + 1 < right
      mid = left + (right - left) / 2;
      if self[mid] >= value
        right = mid
      else
        left = mid
      end
    end
    right
  end

  def unique
    res = [self.first]
    each_cons(2) do |a, b|
      if a != b
        res.push(b)
      end
    end
    res
  end
end

def get_ints
  gets.split.map(&:to_i)
end

def get_ints_minus_one
  get_ints.map { |x| x - 1 }
end

def get_int
  gets.chomp.to_i
end


N = get_int
A = get_ints

approved = true
A.each do |a|
  if a % 2 == 0
    if a % 3 != 0 && a % 5 != 0
      approved = false
      break
    end
  end
end

puts approved ? 'APPROVED' : 'DENIED'
//  [ruby]
n=gets.to_i
s=gets.split.map!(&:to_i)
ans=0
pen=0
for i in 0..n-1
  if s[i]%2==0
    if s[i]%3==0 || s[i]%5==0
      ans=1
    else
      pen=1
    end
  end
end
if ans==1 && pen==0 || ans==0 && pen==0
  puts "APPROVED"
else
  puts "DENIED"
end
//  [rust]
use std::io;
use std::str::FromStr;

fn input<T:FromStr>() -> T {
    let mut line: String = String::new();
    io::stdin().read_line(&mut line);
    line.trim().parse().ok().unwrap()
}

fn input_vec() -> Vec<u64> {
    let mut line: String = String::new();
    io::stdin().read_line(&mut line);
    line.split_whitespace().map(|s| s.parse().unwrap()).collect()
}

fn main() {
    let n: u64 = input();
    let a_vec = input_vec();
    for a in a_vec {
        if a % 2 == 0 {
            if a % 3 != 0 && a % 5 != 0 {
                println!("DENIED");
                return;
            }
        }
    }
    println!("APPROVED");
}
//  [rust]
macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        let mut next = || { iter.next().unwrap() };
        input_inner!{next, $($r)*}
    };
    ($($r:tt)*) => {
        let stdin = std::io::stdin();
        let mut bytes = std::io::Read::bytes(std::io::BufReader::new(stdin.lock()));
        let mut next = move || -> String{
            bytes
                .by_ref()
                .map(|r|r.unwrap() as char)
                .skip_while(|c|c.is_whitespace())
                .take_while(|c|!c.is_whitespace())
                .collect()
        };
        input_inner!{next, $($r)*}
    };
}

macro_rules! input_inner {
    ($next:expr) => {};
    ($next:expr, ) => {};

    ($next:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($next, $t);
        input_inner!{$next $($r)*}
    };
}

macro_rules! read_value {
    ($next:expr, ( $($t:tt),* )) => {
        ( $(read_value!($next, $t)),* )
    };

    ($next:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($next, $t)).collect::<Vec<_>>()
    };

    ($next:expr, chars) => {
        read_value!($next, String).chars().collect::<Vec<char>>()
    };

    ($next:expr, usize1) => {
        read_value!($next, usize) - 1
    };

    ($next:expr, $t:ty) => {
        $next().parse::<$t>().expect("Parse error")
    };
}

fn main(){

    input!{
        n: usize,
        a: [usize;n],
    }

    let mut flag: bool = true;
    for value in a{
        if value % 2 == 0{
            if value % 3 != 0 && value % 5 != 0{
                flag = false;
            } 
        }
    }
    if flag == true {
        println!("APPROVED");
    } else {
        println!("DENIED");
    }

}
//  [swift]
import Foundation
 
let N = Int(readLine()!)!
let array = readLine()!.componentsSeparatedByString(" ").map { Int($0)! }
var answer = "APPROVED"
for i in 0..<N {
  if array[i] % 2 == 0 {
    if array[i] % 3 != 0 && array[i] % 5 != 0 {
      answer = "DENIED"
      break
    }
  }
}
print(answer)
//  [swift]
import Foundation

let N = Int(readLine()!)!
let entryNumber = readLine()!.components(separatedBy: " ").map{ Int($0)! }

var evenNumbers:[Int] = []
var j = 0

for i in 0...N - 1 {
    if entryNumber[i] % 2 == 0 {
        evenNumbers.append(entryNumber[i])
        if evenNumbers[j] % 3 != 0 && evenNumbers[j] % 5 != 0 {
            print("DENIED")
            break
        }
        j += 1
    }
    if i == N - 1 {
        print("APPROVED")
    }
}
//  [typescript]
import * as fs from 'fs';

const input = (fs.readFileSync('/dev/stdin', 'utf8') as string).split('\n');

const n = +input[0];
const li = input[1].split(' ').map((x: string): number => +x);

let ans: string = 'APPROVED';
li.forEach(num => {
    if(num % 2 === 0){
        if(num % 3 !== 0 && num % 5 !== 0){
            ans = 'DENIED';
        }
    }
})

console.log(ans);
//  [typescript]
import * as fs from "fs";

const split = (str: string): string[] =>
  str.split(" ").map((v: string) => v.trim());
const split_number = (str: string): number[] =>
  split(str).map((v: string) => +v);

export function main(input: string) {
  const lines = input.split("\n");
  const [n] = split_number(lines[0]);
  const A = split_number(lines[1]);

  const before = A.filter(n => n % 2 === 0);
  const after = before.filter(n => n % 3 === 0 || n % 5 === 0);

  return before.length === after.length ? "APPROVED" : "DENIED";
}

if (!process.env.LOCAL_DEBUG) {
  console.log(main(fs.readFileSync("/dev/stdin", "utf8")));
}
//  [typescript]
function Main(input) {
  const lines = input.split("\n");
  const as = lines[1].split(' ').map(v => +v);
  let result = 'APPROVED';
  
  as.some(v => {
    if (v % 2 == 0 && v % 3 != 0 && v % 5 != 0) {
        result = 'DENIED';
        return true;
    }
  });

  console.log(result);
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [typescript]
import * as fs from 'fs';
// main
function main(input: string[]) {
    // param
    let n;
    let an;
    let ans;
    // init
    n = Number(input.shift());
    an = input.shift().split(" ").map(x => Number(x));
    // solve
    ans = "APPROVED";
    for (var ane of an) {
        if (ane % 2 == 0) {
            if (ane % 3 == 0 || ane % 5 == 0) {
                continue;
            }
            else {
                ans = "DENIED";
                break;
            }
        } else {
            continue;
        }
    }
    // answer
    console.log(ans);
}
// entrypoint
function entrypoint() {
    try {
        // linux
        let input = fs.readFileSync("/dev/stdin", "utf8").trim().split("\n");
        console.debug = function () { };
        main(input);
    }
    catch (ex) {
        // windows
        const lines: string[] = [];
        // @ts-ignore
        const reader = require('readline').createInterface({
            // @ts-ignore
            input: process.stdin,
            // @ts-ignore
            output: process.stdout
        });
        reader.on('line', function (line: string) {
            lines.push(line);
        });
        reader.on('close', function () {
            let input = lines;
            main(input);
        });
    }
}
entrypoint();
//  [typescript]
class AtCoder {
  // 入力系
  input=[];
  input_i=-1;
  n(){
    this.input_i++;
    return Number(this.input[this.input_i]);
  }
  nn(n){
    const a=[];
    for(let i=0;i<n;i++){
      a.push(this.n());
    }
    return a;
  }
  s(){
    this.input_i++;
    return String(this.input[this.input_i]);
  }
  ss(n){
    const a=[];
    for(let i=0;i<n;i++){
      a.push(this.s());
    }
    return a;
  }
 
  // コンソール
  o(...a:any){
    console.log(...a);
  }
 
  // Math
  abs(a:number){
    return Math.abs(a);
  }
  min(...a:number[]){
    return Math.min(...a);
  }
  max(...a:number[]){
    return Math.max(...a);
  }
  floor(a:number){
    return Math.floor(a);
  }
  ceil(a:number){
    return Math.ceil(a);
  }
  round(a:number){
    return Math.round(a);
  }
 
  // ソート
  asc(ar:number[]){
    const t=[...ar];
    ar.sort((a,b)=>{return a-b});
  }
  desc(ar:number[]){
    const t=[...ar];
    ar.sort((a,b)=>{return b-a});
  }
 
  // 自作
  gcd(...arr):number{
    for(let i=0;i<arr.length-1;i++){
      let [x,y]=[arr[i],arr[i+1]];
      while(y){
        [x,y]=[y,x%y];
      }
      arr[i+1]=x;
    }
    return arr[arr.length-1];
  };
  lcm(...arr):number{
    for(let i=0;i<arr.length-1;i++){
      let [x,y]=[arr[i],arr[i+1]];
      while(y){
        [x,y]=[y,x%y];
      }
      arr[i+1]=arr[i]*arr[i+1]/x;
    }
    return arr[arr.length-1];
  };
  isPrime(n:number):boolean{
    if(n < 2) return false;
    const suq=Math.sqrt(n);
    for(let i=2;i<=suq;i++){
      if(n%i==0){
        return false;
      }
    }return true;
  };
  deduplicate(a:any[]):any[]{
    return Array.from(new Set(a));
  };
}
const o = new AtCoder()
var reader = require('readline').createInterface({
  input: process.stdin,
  output: process.stdout
});
reader.on('line',(line:any)=> {
  o.input.push(...line.split(/[\s]/));
});

process.stdin.on('end', ()=> {
  let n=o.n(),arr=o.nn(n)
  for(let i=0;i<n;i++){
    if(arr[i] % 2 == 0) {
      if(arr[i] % 3 != 0 && arr[i] % 5 != 0) {
        o.o('DENIED')
        return
      }
    }
  }
  o.o('APPROVED')
});
//  [typescript]
process.stdin.resume();
process.stdin.setEncoding('utf8');

// 標準入力取込
var g_input = '';
process.stdin.on('data', function(chunk) {
    g_input += chunk;
});
process.stdin.on('end', function() {
    main(g_input.split(/\r?\n/));
});

// 解答
function main(inputs:Array<string>) : void {

    let count: number = Number(inputs[0].split(' ')[0]);
    let numList: number[] = inputs[1].split(' ').map(Number);

    for (let num of numList) {

        if (num % 2 == 0
            && ((num % 3 != 0) && (num % 5 != 0))) {

            return console.log('DENIED');
        }
    }

    return console.log('APPROVED');
}
//  [python]
use = input()
if "AC" in use:
    print("Yes")
else:
    print("No")
//  [python]
s = input()
if "AC" in s:
  print("Yes")
else:
  print("No")
//  [python]
print("Yes" if "AC" in input() else "No")
//  [python]
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**15
mod = 10**9+7

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)


def main():
    s = S()
    l = len(s)
    for i in range(l-1):
        if s[i:i+2] == 'AC':
            return 'Yes'

    return 'No'


print(main())
//  [python]
def main():
    s = input()
    if "AC" in s:
        print("Yes")
    else:
        print("No")


if __name__ == "__main__":
    main()
//  [python]
import math
import decimal
import queue
import bisect
import heapq
import time
import itertools

mod = int(1e9+7)

class Library():
    @staticmethod
    def Swap(a,b):
        return [b,a]

    @staticmethod
    def myRound(a,dig=0): # 四捨五入
        p = 10 ** dig
        return (a * p * 2 + 1) // 2 / p

    @staticmethod
    def Roundup(a,dig=0): # 切り上げ
        if a < 0:
            return int(a)
        else:
            return int(a + 0.9)

    @staticmethod
    def Gcd(a,b): #最大公約数
        if (a<b):
            a,b = Library.Swap(a,b)
        if (b==0):
            return a
        else:
            return Library.Gcd(b,a%b)

    @staticmethod
    def Lcm(a,b): #最小公倍数
        return a//Library.Gcd(a,b)*b

    @staticmethod
    def Divisors(a): # 約数列挙
        divisors = []
        for i in range(1,int(a**0.5)+1):
            if a%i==0:
                divisors.append(i)
                if i!=a//i:
                    divisors.append(a//i)
        divisors.sort()
        return divisors

class Prime():
    # コンストラクタ
    # エラストテネスの篩
    def __init__(self,num):
        self.num = num
        self.sieve = [0] * (self.num + 1)
        self.sieve[0] = -1
        self.sieve[1] = -1
        for i in range(2,self.num + 1):
            if not self.sieve[i]:
                self.sieve[i] = i
                for j in range(i * i,self.num + 1,i):
                    if self.sieve[j]:
                        self.sieve[j] = i
    
    # 素数判定
    def isPrime(self,num = None):
        if num is None:
            num = self.num
        if self.sieve[num] == num:
            return True
        else:
            return False
    
    # 素数列挙
    def PrimeNum(self,num = None):
        if num is None:
            num = self.num
        prime = []
        for i in range(2,num):
            if self.sieve[i] == i:
                prime.append(i)
        return prime
    
    # 素因数分解
    def PrimeFact(self,num = None):
        if num is None:
            num = self.num
        fact = []
        while self.sieve[num] != num:
            fact.append(self.sieve[num])
            num //= self.sieve[num]
        fact.append(num)
        return fact

def main():
    s = input()
    for i in range(len(s) - 1):
        if s[i] == 'A' and s[i + 1] == 'C':
            print('Yes')
            return
    print('No')
    return

if __name__=='__main__':
    main()
//  [java]
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class Main {
	public static void main(String[] args){
		FastScanner sc = new FastScanner();
		String s = sc.nextToken();

		System.out.println(s.indexOf("AC") != -1 ? "Yes" : "No");
	}

	public static class FastScanner {
		BufferedReader br;
		StringTokenizer st;

		public FastScanner(String s) {
			try {
				br = new BufferedReader(new FileReader(s));
			} catch (FileNotFoundException e) {
				e.printStackTrace();
			}
		}

		public FastScanner() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}

		String nextToken() {
			while (st == null || !st.hasMoreElements()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}

		int nextInt() {
			return Integer.parseInt(nextToken());
		}

		long nextLong() {
			return Long.parseLong(nextToken());
		}

		double nextDouble() {
			return Double.parseDouble(nextToken());
		}
	}
}
//  [java]
import java.util.*;
import java.io.*;

public class Main {

	void solve() {
		out.println(in.nextToken().contains("AC") ? "Yes" : "No");
	}

	FastScanner in;
	PrintWriter out;

	void run() {
		in = new FastScanner();
		out = new PrintWriter(System.out);
		solve();
		out.close();
	}

	class FastScanner {
		BufferedReader br;
		StringTokenizer st;

		public FastScanner() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}

		public FastScanner(String s) {
			try {
				br = new BufferedReader(new FileReader(s));
			} catch (FileNotFoundException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		}

		public String nextToken() {
			while (st == null || !st.hasMoreTokens()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
				}
			}
			return st.nextToken();
		}

		public int nextInt() {
			return Integer.parseInt(nextToken());
		}

		public long nextLong() {
			return Long.parseLong(nextToken());
		}

		public double nextDouble() {
			return Double.parseDouble(nextToken());
		}
	}

	public static void main(String[] args) {
		new Main().run();
	}
}
//  [java]
import java.io.File;
import java.io.FileInputStream;
import java.util.Scanner;
import java.util.Map.Entry;
import java.util.function.DoubleToLongFunction;

import javax.naming.InitialContext;

import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.Deque;
import java.util.HashMap;
import java.util.List;
import java.util.NoSuchElementException;

public class Main {
	
	public static void main(String[] args) throws IOException {
		FastScanner sc = new FastScanner(System.in);
		
		String S = sc.next();
		System.out.println((S.contains("AC")) ? "Yes" : "No");
	}
}



class FastScanner {
    private InputStream in;
    private final byte[] buffer = new byte[1024];
    private int ptr = 0;
    private int buflen = 0;
    public FastScanner(InputStream in) {
		this.in = in;
	}
    private boolean hasNextByte() {
        if (ptr < buflen) {
            return true;
        }else{
            ptr = 0;
            try {
                buflen = in.read(buffer);
            } catch (IOException e) {
                e.printStackTrace();
            }
            if (buflen <= 0) {
                return false;
            }
        }
        return true;
    }
    private int readByte() {
    	if (hasNextByte()) return buffer[ptr++];
    	else return -1;
    }
    private static boolean isPrintableChar(int c){
    	return 33 <= c && c <= 126;
    }
    public boolean hasNext() {
    	while(hasNextByte() && !isPrintableChar(buffer[ptr]))
    		ptr++; return hasNextByte();
    }
    public String next() {
        if (!hasNext()) throw new NoSuchElementException();
        StringBuilder sb = new StringBuilder();
        int b = readByte();
        while(isPrintableChar(b)) {
            sb.appendCodePoint(b);
            b = readByte();
        }
        return sb.toString();
    }
    public long nextLong() {
        if (!hasNext()) throw new NoSuchElementException();
        long n = 0;
        boolean minus = false;
        int b = readByte();
        if (b == '-') {
            minus = true;
            b = readByte();
        }
        if (b < '0' || '9' < b) {
            throw new NumberFormatException();
        }
        while(true){
            if ('0' <= b && b <= '9') {
                n *= 10;
                n += b - '0';
            }else if(b == -1 || !isPrintableChar(b)){
                return minus ? -n : n;
            }else{
                throw new NumberFormatException();
            }
            b = readByte();
        }
    }
    public int nextInt() {
        long nl = nextLong();
        if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE) throw new NumberFormatException();
        return (int) nl;
    }
    public double nextDouble() {
    	return Double.parseDouble(next());
    }
}
//  [java]

public class Main {
  private static void solve() {
   String s = next();
   if (s.contains("AC")) {
     System.out.println("Yes");
   } else {
     System.out.println("No");
   }
    
    
  }

  public static void main(String[] args) {
    new Thread(null, new Runnable() {
      @Override
      public void run() {
        long start = System.currentTimeMillis();
        String debug = args.length > 0 ? args[0] : null;
        if (debug != null) {
          try {
            is = java.nio.file.Files.newInputStream(java.nio.file.Paths.get(debug));
          } catch (Exception e) {
            throw new RuntimeException(e);
          }
        }
        reader = new java.io.BufferedReader(new java.io.InputStreamReader(is), 32768);
        solve();
        out.flush();
        tr((System.currentTimeMillis() - start) + "ms");
      }
    }, "", 64000000).start();
  }

  private static java.io.InputStream is = System.in;
  private static java.io.PrintWriter out = new java.io.PrintWriter(System.out);
  private static java.util.StringTokenizer tokenizer = null;
  private static java.io.BufferedReader reader;

  public static String next() {
    while (tokenizer == null || !tokenizer.hasMoreTokens()) {
      try {
        tokenizer = new java.util.StringTokenizer(reader.readLine());
      } catch (Exception e) {
        throw new RuntimeException(e);
      }
    }
    return tokenizer.nextToken();
  }

  private static double nd() {
    return Double.parseDouble(next());
  }

  private static long nl() {
    return Long.parseLong(next());
  }

  private static int[] na(int n) {
    int[] a = new int[n];
    for (int i = 0; i < n; i++)
      a[i] = ni();
    return a;
  }

  private static char[] ns() {
    return next().toCharArray();
  }

  private static long[] nal(int n) {
    long[] a = new long[n];
    for (int i = 0; i < n; i++)
      a[i] = nl();
    return a;
  }

  private static int[][] ntable(int n, int m) {
    int[][] table = new int[n][m];
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < m; j++) {
        table[i][j] = ni();
      }
    }
    return table;
  }

  private static int[][] nlist(int n, int m) {
    int[][] table = new int[m][n];
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < m; j++) {
        table[j][i] = ni();
      }
    }
    return table;
  }

  private static int ni() {
    return Integer.parseInt(next());
  }

  private static void tr(Object... o) {
    if (is != System.in)
      System.out.println(java.util.Arrays.deepToString(o));
  }
}
//  [cpp]
#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <vector>
#include <cstring>
#include <queue>
#include <cmath>
#include <map>
#include <set>
#include <string>

using namespace std;
typedef long long int ll;
typedef pair <int,int> P;

char str[10];

int main()
{
	scanf("%s",&str);
	int n=strlen(str);
	for(int i=0;i+1<n;i++)
	{
		if(str[i]=='A'&&str[i+1]=='C')
		{
			puts("Yes");
			return 0;
		}
	}
	puts("No");
	return 0;
}
//  [cpp]
#include<cstdio>
#include<cstring>
using namespace std;

char s[100001];

int main()
{
	scanf("%s",s);
	for(int i=0;i<strlen(s);i++)
		if(s[i]=='A'&&s[i+1]=='C')
		{
			printf("Yes");
			return 0;
		}
	printf("No");
}
//  [cpp]
#include <cstdio>
#include <cstring>
using namespace std;
char s[10];
int i;
int main()
{
	scanf("%s",s);int n=strlen(s);
	for (i=0;i<n-1;i++) if (s[i]=='A' && s[i+1]=='C'){
		puts("Yes");return 0;
	}puts("No");
	return 0;
}
//  [cpp]
#include <bits/stdc++.h>
#include <iomanip>

using namespace std;

typedef long long LL;
typedef long double LD;
typedef pair<int, int> PII;
typedef pair<LL, LL> PLL;
typedef pair<LD, LD> PLDLD;
typedef vector<int> VI;
typedef vector<char> VB;

#define FOR(i,a,b) for(int i=(a);i<(int)(b);++i)
#define REP(i,n)  FOR(i,0,n)
#define CLR(a) memset((a), 0 ,sizeof(a))
#define ALL(a) a.begin(),a.end()

const double eps=1e-5;
const long long INF=(LL)(1e9)*(LL)(1e9);

template<class T>
void chmin(T& a, const T& b)
{
	if(a>b)
		a=b;
}
template<class T>
void chmax(T& a, const T& b)
{
	if(a<b)
		a=b;
}

const LL pow(const LL p, const LL q)
{
	LL t=1;
	REP(i,q)
		t*=p;
	return t;
}



int main()
{
	cin.tie(0);
	ios::sync_with_stdio(false);

	string s;
	cin>>s;
	REP(i,s.size()-1)
	{
		if(s[i]=='A' && s[i+1]=='C')
		{
			cout<<"Yes"<<endl;
			return 0;
		}
	}
	cout<<"No"<<endl;
	

	
}
//  [cpp]
#include<bits/stdc++.h>
using namespace std;

string str="AC";
int main()
{
	string ss;
	cin>>ss;
	if(ss.find(str)<=ss.length())	cout<<"Yes";
	else cout<<"No";
	return 0;
}
//  [cpp]
#include <bits/stdc++.h>
using namespace std;

int main(void) {

    string s;
    cin >> s;
    if (s.find("AC") != string::npos) cout << "Yes" << endl;
    else cout << "No" << endl;

    return 0;
}
//  [c]

#include <stdio.h>
#include <string.h>
int main()
{   char s[6];
    scanf("%s",s);
    for(int i=0;i<6;i++)if(s[i]=='A'&&s[i+1]=='C'){
        printf("Yes");
        return 0;
    }
    printf("No");
    return 0;
}
//  [c]
char *S[]={"No","Yes"};
char f;
char c[6];
int i;
int main(){
  scanf("%s", c);
  while(c[++i]);
  f+=i>=2&&c[0]=='A'&&c[1]=='C';
  f+=i>=3&&c[1]=='A'&&c[2]=='C';
  f+=i>=4&&c[2]=='A'&&c[3]=='C';
  f+=i>=5&&c[3]=='A'&&c[4]=='C';
  f=f!=0;
  puts(S[f]);
}
//  [c]
#include<stdio.h>
#include<string.h>
main()
{
	char str[6];
	int l,i,flag=0;
	
	scanf("%s",str);
	
	l=strlen(str);
	
	for(i=0;i<l-1;i++)
	{
		if(str[i]=='A'&&str[i+1]=='C')
	{
		flag=1;
		break;
	}
	}
	if(flag==1)
	{
		printf("Yes");
	}
	else
	printf("No");
}
//  [c]
#include<stdio.h>
#include<stdlib.h>
#include<string.h>

int main(int argc, char *argv[]){

	char line[7];

	fgets(line, sizeof(line), stdin);

	int i;
	for(i=0;i<6;i++){
		if(line[i] == 'A' && line[i+1] == 'C'){
			printf("Yes\n");
			return 0;
		}
	}

	printf("No\n");
	return 0;
}
//  [c]
#include <stdio.h>
#include <string.h>

int main(){
  char S[6];
  int c=0,l;
  scanf("%s",S);
  l=strlen(S);
  for(int i=0;i<l-1;i++){
    if(S[i]=='A' && S[i+1]=='C') c=1;
  }
  if(c==1) printf("Yes\n");
  else printf("No\n");
  return 0;
}
//  [c]
#include <stdio.h>
#include <string.h>
int main() {
	char S[6];
	scanf("%s", S);
	if (strstr(S, "AC") == NULL) {
		printf("No\n");
	} else {
		printf("Yes\n");
	}
	return 0;
}
//  [javascript]
function Main(input) {
	if(input.indexOf("AC") != -1){
       console.log("Yes");
       }else{
       console.log("No");
       }
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [javascript]
"use strict";
    
const main = arg => {
    arg = arg.trim().split("\n");
    const S = arg[0].split("");
    
    let previous = null;
    
    for(let i in S) {
        if(previous === "A" && S[i] === "C") {
            console.log("Yes");
            return;
        }
        
        previous = S[i];
    }
    
    console.log("No");
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [javascript]
function Main(input) {
	var n = input.match(/.?.?.?AC.?.?.?/)
	if(n){
    	console.log("Yes")
    }else{
    console.log("No")
    }
}Main(require("fs").readFileSync("/dev/stdin", "utf8").trim());
//  [javascript]
process.stdin.resume();
process.stdin.setEncoding('utf8');

var g_input = '';
process.stdin.on('data', function(chunk) {
    g_input += chunk;
});

process.stdin.on('end', function() {
    Main(g_input.split(/\r?\n/));
});

function Main(input) {
    var s = input[0];

    if (s.match(/AC/)) {
        console.log('Yes');
    }
    else {
        console.log('No');
    }

    return 0;
}
//  [javascript]
'use strict'

const main = input => {
	const args = input.split('\n').map(arg => arg.split(' '))
	const S = args[0][0]
	const N = S.length 
	let ans = false

	for (let i = 0; i < N - 1; i++) {
		if (S.slice(i, i + 2) === 'AC') ans = true
	}

	console.log(ans ? 'Yes' : 'No')
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'))
//  [go]
package main

import (
	"fmt"
	"strings"
)

func main() {
	var S string
	fmt.Scan(&S)
	if strings.Contains(S, "AC") {
		fmt.Println("Yes")
	} else {
		fmt.Println("No")
	}
}
//  [go]
package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
	"strings"
)

func getScanner(fp *os.File) *bufio.Scanner {
	scanner := bufio.NewScanner(fp)
	scanner.Split(bufio.ScanWords)
	scanner.Buffer(make([]byte, 1000005), 1000005)
	return scanner
}

func getNextString(scanner *bufio.Scanner) string {
	scanner.Scan()
	return scanner.Text()
}

func getNextInt(scanner *bufio.Scanner) int {
	i, _ := strconv.Atoi(getNextString(scanner))
	return i
}

func getNextInt64(scanner *bufio.Scanner) int64 {
	i, _ := strconv.ParseInt(getNextString(scanner), 10, 64)
	return i
}

func getNextUint64(scanner *bufio.Scanner) uint64 {
	i, _ := strconv.ParseUint(getNextString(scanner), 10, 64)
	return i
}

func getNextFloat64(scanner *bufio.Scanner) float64 {
	i, _ := strconv.ParseFloat(getNextString(scanner), 64)
	return i
}

func main() {
	fp := os.Stdin
	wfp := os.Stdout
	cnt := 0

	if os.Getenv("MASPY") == "ますピ" {
		fp, _ = os.Open(os.Getenv("BEET_THE_HARMONY_OF_PERFECT"))
		cnt = 4
	}
	if os.Getenv("MASPYPY") == "ますピッピ" {
		wfp, _ = os.Create(os.Getenv("NGTKANA_IS_GENIUS10"))
	}

	scanner := getScanner(fp)
	writer := bufio.NewWriter(wfp)
	solve(scanner, writer)
	for i := 0; i < cnt; i++ {
		fmt.Fprintln(writer, "-----------------------------------")
		solve(scanner, writer)
	}
	writer.Flush()
}

func solve(scanner *bufio.Scanner, writer *bufio.Writer) {
	s := getNextString(scanner)
	if strings.LastIndex(s, "AC") == -1 {
		fmt.Fprintln(writer, "No")
		return
	}
	fmt.Fprintln(writer, "Yes")
}
//  [go]
package main

import (
	"fmt"
	"strings"
)

func main() {
	var s string
	fmt.Scan(&s)

	if strings.Contains(s, "AC") {
		fmt.Println("Yes")
	} else {
		fmt.Println("No")
	}
}
//  [go]
package main

import (
	"fmt"
	"strings"
)

func main() {
	// Code for A - Can you get AC?
	var S string
	fmt.Scan(&S)

	if strings.Index(S, "AC") != -1 {
		fmt.Println("Yes")
	} else {
		fmt.Println("No")
	}
}
//  [ruby]
S = gets.chomp
(S.length-1).times do |i|
    if S[i] == 'A' && S[i+1]== 'C'
        puts "Yes"
        exit
    end
end
puts "No"
//  [ruby]
s=gets.chomp
puts s.include?('AC') ? "Yes" : "No"
//  [ruby]
puts gets.strip.index('AC') ? 'Yes' : 'No'
//  [ruby]
puts`dd`[/AC/]?:Yes: :No
//  [ruby]
S = gets.chomp
N = S.length
N.times do |i|
  if S[i,2] == 'AC'
    puts 'Yes'
    exit
  end
end
puts 'No'
//  [ruby]
s = gets.chomp
puts s =~ /AC/ ? 'Yes' : 'No'
//  [rust]
#![allow(unused_imports)]

use std::cmp;
use std::cmp::{max, min, Ordering};
use std::collections::{BTreeMap, BTreeSet, BinaryHeap, HashMap, HashSet, VecDeque};
use std::io::stdin;
use std::ops::*;
use std::process::exit;
use std::str::FromStr;

#[macro_export]
macro_rules! minimum {
    ($($e:expr),+) => {
        {
            let mut res = Vec::new();
            $(
                res.push($e);
            )+
            res.into_iter().min().unwrap()
        }
    };
}

pub const MOD: usize = 1000000007;

fn main() {
    let s: Vec<char> = input::<String>().chars().collect();
    let mut ans = "No";
    for w in s.windows(2) {
        if w == &['A', 'C'] {
            ans = "Yes";
            break;
        }
    }
    println!("{}", ans);
}

pub fn input<T: FromStr>() -> T {
    let mut buf = String::new();
    stdin().read_line(&mut buf).unwrap();
    buf.trim().parse().ok().unwrap()
}

pub fn input_vec<T: FromStr>() -> Vec<T> {
    let mut buf = String::new();
    stdin().read_line(&mut buf).unwrap();
    buf.trim()
        .split_whitespace()
        .map(|x| x.parse().ok().unwrap())
        .collect::<Vec<_>>()
}

pub fn input_lines<T: FromStr>(l: usize) -> Vec<T> {
    let mut res = Vec::new();
    for _i in 0..l {
        res.push(input());
    }
    res
}

pub fn input_lines_two<T: FromStr, U: FromStr>(l: usize) -> Vec<(T, U)> {
    let mut res = Vec::new();
    for _i in 0..l {
        res.push(input_two());
    }
    res
}

pub fn input_lines_three<T: FromStr, U: FromStr, V: FromStr>(l: usize) -> Vec<(T, U, V)> {
    let mut res = Vec::new();
    for _i in 0..l {
        res.push(input_three());
    }
    res
}

pub fn input_two<T: FromStr, U: FromStr>() -> (T, U) {
    let mut buf = String::new();
    stdin().read_line(&mut buf).unwrap();
    let s: Vec<&str> = buf.split_whitespace().collect();
    (
        s[0].parse::<T>().ok().unwrap(),
        s[1].parse::<U>().ok().unwrap(),
    )
}

pub fn input_three<T: FromStr, U: FromStr, V: FromStr>() -> (T, U, V) {
    let mut buf = String::new();
    stdin().read_line(&mut buf).unwrap();
    let s: Vec<&str> = buf.split_whitespace().collect();
    (
        s[0].parse::<T>().ok().unwrap(),
        s[1].parse::<U>().ok().unwrap(),
        s[2].parse::<V>().ok().unwrap(),
    )
}

pub fn input_four<T: FromStr, U: FromStr, V: FromStr, W: FromStr>() -> (T, U, V, W) {
    let mut buf = String::new();
    stdin().read_line(&mut buf).unwrap();
    let s: Vec<&str> = buf.split_whitespace().collect();
    (
        s[0].parse().ok().unwrap(),
        s[1].parse().ok().unwrap(),
        s[2].parse().ok().unwrap(),
        s[3].parse().ok().unwrap(),
    )
}

pub fn input_matrix<T: FromStr + Clone>(h: usize) -> Vec<Vec<T>> {
    let mut res = vec![Vec::new(); h];
    for i in 0..h {
        res[i] = input_vec();
    }
    res
}
//  [rust]
use std::str::FromStr;
use std::fmt::Debug;
use std::cmp;
#[allow(dead_code)]
fn read_as_vec<T>() -> Vec<T>
where T: FromStr, <T as FromStr>::Err : Debug{
    let mut s = String::new();
    std::io::stdin().read_line(&mut s).unwrap();
    s.trim().split_whitespace().map(|c| T::from_str(c).unwrap()).collect()

}

#[allow(dead_code)]
fn read_as_string() -> String{
    let mut s = String::new();
    std::io::stdin().read_line(&mut s).unwrap();
    s.trim().to_string()
}

fn main(){
    let s = read_as_string();

    if s.contains("AC"){
        println!("Yes");
    }else{
        println!("No");
    }
}
//  [rust]
use proconio::input;

fn main() {
    input! {
        s: String,
    };
    let ans = s.find("AC").is_some();
    println!("{}", if ans { "Yes" } else { "No" });
}
//  [rust]
use std::io::Read;

fn main() {
    let mut buf = String::new();
    std::io::stdin().read_to_string(&mut buf).unwrap();

    let answer = solve(&buf);

    println!("{}", answer);
}

fn solve(input: &str) -> String {
    let mut iterator = input.split_whitespace();

    let s: Vec<char> = iterator.next().unwrap().chars().collect();
    for i in 1..s.len() {
        if s[i - 1] == 'A' && s[i] == 'C' {
            return "Yes".to_string();
        }
    }
    return "No".to_string();
}
//  [rust]
#![allow(unused_imports)]
#![allow(non_snake_case)]
use std::cmp::*;
use std::collections::*;
use std::io::Write;

#[allow(unused_macros)]
macro_rules! debug {
    ($($e:expr),*) => {
        #[cfg(debug_assertions)]
        $({
            let (e, mut err) = (stringify!($e), std::io::stderr());
            writeln!(err, "{} = {:?}", e, $e).unwrap()
        })*
    };
}

fn main() {
    let s = read::<String>().chars().collect::<Vec<_>>();
    for i in 0..s.len() - 1 {
        if s[i] == 'A' && s[i + 1] == 'C' {
            println!("Yes");
            return;
        }
    }
    println!("No");
}

fn read<T: std::str::FromStr>() -> T {
    let mut s = String::new();
    std::io::stdin().read_line(&mut s).ok();
    s.trim().parse().ok().unwrap()
}

fn read_vec<T: std::str::FromStr>() -> Vec<T> {
    read::<String>()
        .split_whitespace()
        .map(|e| e.parse().ok().unwrap())
        .collect()
}
//  [swift]
import Foundation
print(readLine()!.containsString("AC") ?"Yes":"No")
//  [typescript]
function solve(lines: string): void {
  const s = lines[0];
  if (s.match(/AC/)) {
    console.log('Yes');
  } else {
    console.log('No');
  }
}
let buf = '';
process.stdin.setEncoding('utf8');
process.stdin.on('readable', () => {
  const s = process.stdin.read();
  if (s !== null) { buf += s.toString(); }
});
process.stdin.on('end', () => {
  solve(buf.trim().split("\n"));
});
//  [python]
n = int(input())
a = list(map(int, input().split()))

def nim(x):
  bx = [format(i,'030b') for i in x]
  bz = ''.join([str( sum([int(bx[xi][i]) for xi in range(len(x))]) % 2)  for i in range(30)])
  return int(bz, 2)

nima = nim(a)
ans = [ str(nim([nima,aa])) for aa in a ]
print(' '.join(ans) )
//  [python]
N = int(input())
A = list(map(int,input().split()))

def binary(a):
    x = a
    out = ''
    while a>0:
        out = str(a % 2) + out
        a = int(a / 2)
    return out

binaryA = [0]*N
for i in range(N-1):
    binaryA[i] = binary(A[i])

S = 0

for i in A:
    S = S ^ i

ans = []
for i in A:
    ans.append(str(S^i))

print(' '.join(ans))
//  [python]
# -*- coding: utf-8 -*-
"""
@author: H_Hoshigi
"""
def main():
    N = int(input())
    A_lsit = list(map(int, input().split()))
    A_binstr_lsit = [bin(a)[2:].zfill(30) for a in A_lsit]

    is_odd_list = [
        bool(sum([
                int(A_binstr_lsit[j][i])
                for j in range(N)
            ])%2)
        for i in range(30)
    ]

    #print(A_lsit)
    #print(A_binstr_lsit)
    #print(is_odd_list)

    answer_list = []

    for i in range(N):
        A_bin = A_binstr_lsit[i]
        answer = ""
        for j in range(30):
            if is_odd_list[j]:
                if A_bin[j] == "1":
                    answer += "0"
                else:
                    answer += "1"
            else:
                answer += A_bin[j]
        answer_list.append(str(int(answer, 2)))
    print(" ".join(answer_list))

if __name__ == "__main__":
    main()
//  [java]
import java.math.BigInteger;
import java.util.*;
import java.util.stream.Collectors;

public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    long n = sc.nextLong();
    Map<Long, BigInteger> a = new HashMap<>();
    BigInteger xor = BigInteger.ZERO;
    for (long i = 0; i < n; i++) {
      BigInteger ai = new BigInteger(sc.next());
      xor = xor.xor(ai);
      a.put(i, ai);
    }
    for (long i = 0; i < n; i++) {
      BigInteger bigInteger = a.get(i);
      System.out.print(bigInteger.xor(xor));
      if (i != n - 1) {
        System.out.print(" ");
      }
    }
    System.out.println();
  }
}
//  [java]
import java.util.ArrayList;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long N = sc.nextLong();
        ArrayList<Long> A = new ArrayList<>();
        long xor = 0;
        for (var i = 0; i < N; i++) {
            long a = sc.nextLong();
            A.add(a);
            xor = xor ^ a;
        }
        for (var i = 0; i < N; i++)
            System.out.printf("%d ",xor ^ A.get(i));
    }
}
//  [java]
import java.util.*;
import java.io.*;
 
public class Main{
	public static String toBin(long A) {
		String S = "";
		while(A != 0){
			long amari = A%2;
			S = String.valueOf(amari) + S;
			A = A/2;
		}
		for(int i = S.length(); i < 40; i++){
			S = "0" + S;
		} 
		return S;
	}
    
	public static void main(String[] $){
		Scanner s = new Scanner(System.in);
		int N = s.nextInt();
		String[] A = new String[N];
		String xor = "0000000000000000000000000000000000000000";
		for(int i = 0; i < N; i++){
			long moto = s.nextLong();
			A[i] = toBin(moto);
			String exam = "";
			for(int j = 0; j < 40; j++){
				if(xor.charAt(j) == A[i].charAt(j)){
					exam = exam+"0";
				}else{
					exam = exam+"1";
				}
			}
			xor = exam;
		}

		StringBuilder sb = new StringBuilder();
		for(int i = 0; i < N; i++){
			String result = "";
			for(int j = 0; j < 40; j++){
				if(xor.charAt(j) == A[i].charAt(j)){
					result = result+"0";
				}else{
					result = result+"1";
				}
			}
			sb.append(Long.parseLong(result, 2) + " ");
		}
		System.out.println(sb.toString());
	}
}
//  [cpp]
#include <bits/stdc++.h>
#include <cstdlib>
#include <cmath>
#include <algorithm>
using namespace std;
using ll = long long;
using P = pair<int,int>;
using Graph= vector<vector<int>>; 
#define rep(i,n) for (ll i=0; i < (n); ++i)
#define rep2(i,n,m) for(ll i=n;i<=m;i++)
#define rep3(i,n,m) for(ll i=n;i>=m;i--)
#define pb push_back
#define eb emplace_back
#define ppb pop_back
#define mpa make_pair
const ll INF=1e18 ;
inline void chmax(ll& a,ll b){a=max(a,b);}
inline void chmin(ll& a,ll b){a=min(a,b);}


int main(){
  ll n ; cin>> n ;
 vector<ll> A(n) ;rep(i,n) cin>>A[i] ;

 vector<ll> sum(100) ;
vector<vector<ll>> p(n,vector<ll>(100,0)) ;
rep(j,n){
  ll lo=A[j] ;
  rep(i,100){
   p[j][i]=lo%2ll ;
   sum[i]+=p[j][i] ;
   lo= lo/2ll ;
  }
 }
 
rep(i,100) sum[i]= sum[i]%2ll ;

rep(j,n){
  ll ans=0 ;
  rep(i,100){
   if(sum[i]==0) ans+=p[j][i]*pow(2,i) ;
   else ans+= (1-p[j][i])*pow(2,i) ;
  }
 cout<<ans<<endl ;

}
  return 0 ;
}
//  [cpp]
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <queue>
#include <cmath>
#include <climits>
#include <iomanip>
#include <set>
#include <map>
using namespace std;
typedef long long ll;
int main(){
  ll n = 0;
  cin >> n;
  vector<ll> a(n);
  for(int i = 0;i < n;i++)cin >> a[i];
  vector<vector<ll>> bit(n,vector<ll>(31));
  for(int i = 0;i < n;i++){
    for(int j = 30;j >= 0;j--){
      if(a[i] >= pow(2,j)){
        bit[i][j] = 1;
        a[i] -= pow(2,j);
      }
      else bit[i][j] = 0;
    }
  }
  //vector<ll> count(20);
  for(int i = 0;i < 31;i++){
    ll count = 0;
    for(int j = 0;j < n;j++){
      count += bit[j][i];
    }
    if(count % 2 == 1){
      for(int j = 0;j < n;j++){
        bit[j][i] = 1 - bit[j][i];
      }
    }
  }
  //for(int i = 0;i < 20;i++)
  vector<ll> res(n);
  for(int i = 0;i < n;i++){
    for(int j = 0;j < 31;j++){
      res[i] += pow(2,j) * bit[i][j];
    }
    if(i != n - 1)cout << res[i] << " ";
    else cout << res[i] << endl;
  }
}
//  [c]
#include <stdio.h>
#include <math.h>

int main(void) {

  long n;
  scanf("%ld", &n);
  long bit[n][30];
  for (long i = 0; i < n; i++) {
    for (long j = 0; j < 30; j++) {
      bit[i][j] = 0;
    }
  }
  long a;
  for (long i = 0; i < n; i++) {
    scanf("%ld", &a);
    bit[i][0] = a;
    for (long j = 1; j < 30; j++) {
      bit[i][j] += bit[i][j-1]/2;
      bit[i][j-1] %= 2;
    }
  }
  long count[30];
  for (long i = 0; i < 30; i++) {
    count[i] = 0;
  }
  for (long i = 0; i < n; i++) {
    for (long j = 0; j < 30; j++) {
      if (bit[i][j] == 1) {
        count[j]++;
      }
    }
  }
  long ans_bit[30];
  long ans;
  for (long i = 0; i < n; i++) {
    for (long j = 0; j < 30; j++) {
      if (count[j]%2 == 0) {
        ans_bit[j] = bit[i][j];
      } else {
        if (bit[i][j] == 0) {
          ans_bit[j] = 1;
        } else {
          ans_bit[j] = 0;
        }
      }
    }
    ans = 0;
    for (long j = 0; j < 30; j++) {
      ans += pow(2,j)*ans_bit[j];
    }
    printf("%ld", ans);
    if (i != n-1) {
      printf(" ");
    } else {
      printf("\n");
    }
  }

  return 0;
}
//  [c]
#include <stdio.h>

int a[200010][30];

int after[200010][30];

int an = 0;

void con(long int z,long int x,int c){
    long int s;
    long int q;

    s = z/x;
    q = z%x;

    a[an][c]  = s;

    if(x != 1)
        con(q,x/2,c+1);
}

void xor(int a1[30], int a2[30],int a3[30]){
    int i;
    for(i=0;i<30;i++)
        a3[i] = (a1[i] + a2[i])%2; 
}

long int ans(int f[30])
{
    int x = 1;

    int i = 29;

    long int num = 0;

    while(i >= 0)
    {
        num += x*f[i];
        i--;
        x *= 2;
    }

    return num;
}


int main(){
    int n;
    scanf("%d",&n);

    int i,j; long int b;

    for(i=0;i<n;i++){
        scanf("%ld",&b);
        con(b,1024*1024*1024/2,0);
        an++;
    }

    for(i=1;i<n;i++)
        xor(a[i],after[0],after[0]);

    for(i=1;i<n;i++){
        xor(after[i],after[i-1],after[i]);
        xor(a[i],after[i],after[i]);
        xor(a[i-1],after[i],after[i]);
        }

    printf("%ld",ans(after[0]));
    for(i=1;i<n;i++)
        printf(" %ld",ans(after[i]));
    printf("\n");

    return 0;

}
//  [c]
#include <stdio.h>

long XOR(long a, long b){
  long bit_a[30],bit_b[30],bit_xor[30];
  for (int i = 0; i < 30; i++) {
    bit_a[i] = 0;
    bit_b[i] = 0;
  }
  bit_a[0] = a;
  bit_b[0] = b;
  for (int i = 1; i < 30; i++) {
    bit_a[i] += bit_a[i-1]/2;
    bit_a[i-1] %= 2;
    bit_b[i] += bit_b[i-1]/2;
    bit_b[i-1] %= 2;
  }
  for (int i = 0; i < 30; i++) {
    if (bit_a[i] == bit_b[i]) {
      bit_xor[i] = 0;
    } else {
      bit_xor[i] = 1;
    }
  }
  for (int i = 28; i >= 0; i--) {
    bit_xor[i] += bit_xor[i+1]*2;
  }
  return bit_xor[0];
}

int main(void) {

  long n;
  scanf("%ld", &n);
  long a[n];
  for (long i = 0; i < n; i++) {
    scanf("%ld", &a[i]);
  }
  long all = a[0];
  for (long i = 1; i < n; i++) {
    all = XOR(all,a[i]);
  }
  long ans;
  for (long i = 0; i < n-1; i++) {
    ans = XOR(all,a[i]);
    printf("%ld ", ans);
  }
  ans = XOR(all,a[n-1]);
  printf("%ld\n", ans);

  return 0;
}
//  [javascript]
const main = input => {
  const inputArray = input.split('\n');
  const n = parseInt(inputArray[0], 10);
  const a = inputArray[1].split(' ').map(x => parseInt(x, 10));

  // 全てのxorを計算
  const allxor = a.reduce((prev, current, index, array) => prev ^ current);
  // console.log(allxor);
  let ret = '';
  
  for (let ai of a) {
    ret += (allxor ^ ai) + ' ';
  }
  console.log(ret.trim());
}

main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [javascript]
const readLines = (input) => input.split('\n')
const println = (value) => console.log(value)
const readInt = (input) => parseInt(input, 10)
const readIntList = (input) => input.split(' ').map(n => parseInt(n, 10))
const naturalOrder = (a, b) => {
    if (b == a) return 0
    return (a < b) ? -1 : 1
}

function main(input) {
    const lines = readLines(input)
    const n = readInt(lines[0])
    const aArray = readIntList(lines[1])
    const allXor = aArray.reduce((acc, a) => acc ^ a)
    const ans = aArray.map((a, i) => a ^ allXor).join(' ')
    println(ans)
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [go]
package main

import (
	"fmt"
	"bufio"
	"os"
)
func ri() (n int) {
	sc.Scan()
	for _, v := range sc.Bytes() {
		n = n*10 + int(v-48)
	}
	return
}
var sc = bufio.NewScanner(os.Stdin)
func main() {
	sc.Split(bufio.ScanWords)
	var n int
	fmt.Scan(&n)
	var sq = make([]int, n)
	xor := 0
	for i := range sq {
		sq[i] = ri()
		xor = xor ^ sq[i]
	}
	for i := range sq {
		fmt.Print(sq[i] ^ xor)
		fmt.Print(" ")
	}
}
//  [go]
package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

func main() {
	N := nextInt()

	a := make([]uint, N)
	x := uint(0)

	for i := 0; i < N; i++ {
		a[i] = uint(nextInt())
		x = x ^ a[i]
	}
	for i := 0; i < N; i++ {
		fmt.Print(x ^ a[i])

		if i+1 == N {
			fmt.Println()
		} else {
			fmt.Print(" ")
		}
	}
}

var stdin = initStdin()

func initStdin() *bufio.Scanner {
	bufsize := 1 * 1024 * 1024 // 1 MB
	var stdin = bufio.NewScanner(os.Stdin)
	stdin.Buffer(make([]byte, bufsize), bufsize)
	stdin.Split(bufio.ScanWords)
	return stdin
}

func nextString() string {
	stdin.Scan()
	return stdin.Text()
}

func nextBytes() []byte {
	stdin.Scan()
	return stdin.Bytes()
}

func nextInt() int {
	i, _ := strconv.Atoi(nextString())
	return i
}

func nextInt64() int64 {
	i, _ := strconv.ParseInt(nextString(), 10, 64)
	return i
}

func debug(args ...interface{}) {
	fmt.Fprintln(os.Stderr, args)
}
//  [ruby]
ruijo_memo = [1]
100.times do |i|
  ruijo_memo[i + 1] = ruijo_memo[i] * 2
end
n = gets.to_i
nums = gets.split.map(&:to_i)
memo = Hash.new(0)
nums.each do |num|
  (0...31).each do |i|
    if num[i] == 1
      memo[i] += 1
    end
  end
end
ans = []
nums.each do |num|
  tmp = 0
  (0...31).each do |i|
    if (num[i] == 1 && memo[i].even?) || (num[i] == 0 && memo[i].odd?)
      tmp += ruijo_memo[i]
    end
  end
  ans << tmp
end
puts ans.join(' ')
//  [ruby]
n=gets.to_i
a=gets.split.map(&:to_i)
b=a.inject(:^)
a.each{p _1^b}
//  [ruby]
N = gets.chomp.to_i
a = gets.chomp.split.map(&:to_i)

sum = a.inject(0){|aa, sum| sum^aa}

a.each {|aa| p sum^aa}
//  [rust]
fn solve() {
    let n: usize = read();
    let mut a = vec![];
    let mut m: usize = 0;
    for i in 0..n {
        let v = read();
        a.push(v);
        m = max(m, v);
    }
    // a_i ^ a_i+1 (0 <= i < n)
    // let mut xors = vec![];
    // for i in 1..n {
    //     xors.push(a[i - 1] ^ a[i]);
    // }
    // println!("{:?}", xors);
    // max bit length
    let mut l = 0;
    while m > 0 {
        m >>= 1;
        l += 1;
    }

    let mut ans = vec![0; n];
    for b in 0..l {
        let mut parity = 0;
        for i in 0..n {
            parity ^= a[i] >> b & 1;
        }
        if parity == 1 {
            for i in 0..n {
                ans[i] |= !a[i] & (1 << b);
            }
        } else {
            for i in 0..n {
                ans[i] |= a[i] & (1 << b);
            }
        }
    }
    for i in 0..n {
        println!("{}", ans[i]);
        // let mut check = 0;
        // for j in 0..n {
        //     if j == i {
        //         continue;
        //     }
        //     // println!("xor{}", ans[j]);
        //     check ^= ans[j];
        // }
        // println!("{}", check);
    }
}

fn main() {
    let stack_size = 104_857_600;
    let thd = std::thread::Builder::new().stack_size(stack_size);
    thd.spawn(|| solve()).unwrap().join().unwrap();
}

// =========
#[allow(unused_imports)]
use std::cmp::{max, min, Reverse};
#[allow(unused_imports)]
use std::collections::{BinaryHeap, HashMap, HashSet};
#[allow(unused_imports)]
use std::process::exit;

#[allow(dead_code)]
const MOD: usize = 1000000007;

fn read<T: std::str::FromStr>() -> T {
    use std::io::Read;
    let stdin = std::io::stdin();
    let stdin = stdin.lock();
    let token: String = stdin
        .bytes()
        .map(|c| c.expect("failed to read char") as char)
        .skip_while(|c| c.is_whitespace())
        .take_while(|c| !c.is_whitespace())
        .collect();
    token.parse().ok().expect("failed to parse token")
}

// =========