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 <stdio.h>
#include <stack>
#define MAX 32

using namespace std;

//int main1()
//{
//    unsigned int a, b;
//    scanf("%d %d", &a, &b);

//    int arr[MAX] = {0}, brr[MAX] = {0};
//    int idx = MAX - 1;
//    while (a != 0)
//    {
//        arr[idx--] = a % 2;
//        a = a / 2;
//    }

//    idx = MAX - 1;
//    while (b != 0)
//    {
//        brr[idx--] = b % 2;
//        b = b / 2;
//    }

//    int AND[MAX] = {0}, OR[MAX] = {0}, XOR[MAX] = {0};
//    for (int loop = 0; loop < MAX; loop++)
//    {
//        if (arr[loop] == 1 && brr[loop] == 1)
//        {
//            AND[loop] = 1;
//        }
//        if (arr[loop] == 1 || brr[loop] == 1)
//        {
//            OR[loop] = 1;
//        }
//        if (arr[loop] != brr[loop])
//        {
//            XOR[loop] = 1;
//        }
//    }

//    for (int i = 0; i < MAX; i++)
//    {
//        printf("%d", AND[i]);
//    }
//    printf("\n");
//    for (int i = 0; i < MAX; i++)
//    {
//        printf("%d", OR[i]);
//    }
//    printf("\n");
//    for (int i = 0; i < MAX; i++)
//    {
//        printf("%d", XOR[i]);
//    }
//    printf("\n");

//    return 0;
//}

void outPut(int value)
{
    stack<int> S;
    for (int loop = 0; loop < 32; loop++)
    {
        if (value & (1 << loop))
        {
            S.push(1);
        }
        else
        {
            S.push(0);;
        }
    }
    while (!S.empty()) {
        printf("%d", S.top());
        S.pop();
    }
    printf("\n");
}

int main()
{
    int a, b;
    scanf("%d %d", &a, &b);
    outPut(a & b);
    outPut(a | b);
    outPut(a ^ b);
    return 0;
}