Problem: 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

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
#define rep(i ,n) for(int i=0;i<(int)(n);++i)
using namespace std;
typedef long long int int64;
typedef unsigned long long uint64;

int main(){
    uint64 a , b;
    cin >> a >> b;
    vector<int> a2(32,0);
    vector<int> b2(32,0);
    int i = 0;
    while( a > 0 ){
        a2[i] = a % 2;
        a /= 2;
        ++i;
    }
    i = 0;
    while( b > 0 ){
        b2[i] = b % 2;
        b /= 2;
        ++i;
    }
    reverse(a2.begin(),a2.end());
    reverse(b2.begin(),b2.end());
    rep(i ,32){
        if(a2[i] == b2[i]) cout << a2[i];
        else cout << 0;
    } 
    cout << endl;
    rep(i ,32){
        if(a2[i] == 1 || b2[i] == 1) cout << 1;
        else cout << 0;
    }
    cout << endl;
    rep(i ,32){
        if((a2[i] == 1 && b2[i] == 0 )||(a2[i] == 0 && b2[i]== 1)) cout << 1;
        else cout << 0;
    }
    cout << endl;
}