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>
using namespace std;

void print( int* a );
void AND( int* a, int* b );
void OR( int* a, int* b );
void XOR( int* a, int* b );

int main()
{
    long long x, y;                    //整数の範囲を間違えない
    int bitx[32], bity[32];

    for( int i = 0; i < 32; i++ )
    {
        bitx[i] = 0;
        bity[i] = 0;
    }
    cin >> x >> y;

    int j = 0;
    while( x > 1 )
    {
        bitx[j] = x % 2;
        j++;
        x = x / 2;
    }
    int k = 0;
    while( y > 1 )
    {
        bity[k] = y % 2;
        k++;
        y = y / 2;
    }
    bitx[j] = x;                     //最後のbitを入れる(1)
    bity[k] = y;

    AND( bitx, bity );
    OR( bitx, bity );
    XOR( bitx, bity );

    return 0;
}

void print( int* a )
{
    for( int i = 0; i < 32; i++ )
        cout << a[31-i];
    cout << endl;
}

void AND( int* a, int* b )
{
    int x[32];
    for( int i = 0; i < 32; i++ )
    {
        if( a[i] == 1 && b[i] == 1 )
            x[i] = 1;
        else
            x[i] = 0;
    }
    print( x );
}

void OR( int* a, int* b )
{
    int x[32];
    for( int i = 0; i < 32; i++ )
    {
        if( a[i] == 0 && b[i] == 0 )
            x[i] = 0;
        else
            x[i] = 1;
    }
    print( x );
}

void XOR( int* a, int* b )
{
    int x[32];
    for( int i = 0; i < 32; i++ )
    {
        if( a[i] == b[i] )
            x[i] = 0;
        else
            x[i] = 1;
    }
    print( x );
}