Given two non-negative decimal integers $a$ and $b$, calculate their AND (logical conjunction), OR (logical disjunction) and XOR (exclusive disjunction) and print them in binary representation of 32 bits.

Constraints

* $0 \leq a, b \leq 2^{32} - 1$

Input

The input is given in the following format.


$a \; b$


Output

Print results of AND, OR and XOR in a line respectively.

Example

Input

8 10


Output

00000000000000000000000000001000
00000000000000000000000000001010
00000000000000000000000000000010
import java.util.Scanner;

class Main {

	public static void main(String[] args) {
		try (Scanner sc = new Scanner(System.in)){
			long a = sc.nextLong();
			long b = sc.nextLong();
			String and = Long.toBinaryString(a & b);
			String or = Long.toBinaryString(a | b);  //左シフト
			String xor = Long.toBinaryString(a ^ b);  //右シフト
			and = to32(and);
			or = to32(or);
			xor = to32(xor);
			System.out.println(and + '\n' + or+ '\n' + xor);
		}
	}


	//桁数を32にする
	static String to32(String s) {
		int a = 32-s.length();
		if (a != 0)	for (int i=0; i<a; i++)	s = '0' + s;
		if (a < 0) s = s.substring(s.length()-32);
		return s;
	}
}
