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 <iostream>
#include <algorithm>
#include <math.h>
#include <string>
#include <stack>
#include <set>
#include <vector>
using namespace std;
typedef long long ll;

void printarray(int n, int a[])
{
    for (int i = 0; i < n; i++)
    {
        cout << a[i];
        /*if (i != n - 1)
            cout << " ";*/
    }
    cout << endl;
}

void printpairaraay(int n, pair<int, int> a[])
{
    int x, y;
    for (int i = 0; i < n; i++)
    {
        x = a[i].first;
        y = a[i].second;
        cout << x << " " << y << "\n";
    }
    cout << endl;
}

void swaprange(int b, int t, int e, int a[])
{
    for (int i = 0; i < e - b; i++)
    {
        swap(a[b + i], a[i + t]);
    }
}

int my_binarysearch(int n, int a[], int x)
{
    int ret = 0;
    if (distance(lower_bound(a, a + n, x), upper_bound(a, a + n, x)) != 0)
        ret = 1;
    return ret;
}

void printbit(unsigned int x)
{
    unsigned int b, y;
    
    b = 32;
    int a[b];
    y = pow(2, 31);
    cin >> x;

    for (int i = 0; i < b; i++)
    {
        if (x >= y)
        {
            a[i] = 1;
            x -= y;
        }
        else
            a[i] = 0;

        y = y >> 1;
    }
    printarray(b, a);
}

int main()
{	
  	const unsigned int max = 4294967295;
  	unsigned int a, b;
    cin >> a >> b;
    printbit(a & b);
    printbit(a | b);
    printbit(a ^ b);
    return 0;
}

// getline(cin,s);
// a = strtok(s, ",");  ","で分解
// for (int i = 0; i < n; i++)