Little C loves number «3» very much. He loves all things about it.

Now he is interested in the following problem:

There are two arrays of 2^n intergers a_0,a_1,...,a_{2^n-1} and b_0,b_1,...,b_{2^n-1}.

The task is for each i (0 ≤ i ≤ 2^n-1), to calculate c_i=∑ a_j ⋅ b_k (j|k=i and j\&k=0, where "|" denotes [bitwise or operation](https://en.wikipedia.org/wiki/Bitwise_operation#OR) and "\&" denotes [bitwise and operation](https://en.wikipedia.org/wiki/Bitwise_operation#AND)).

It's amazing that it can be proved that there are exactly 3^n triples (i,j,k), such that j|k=i, j\&k=0 and 0 ≤ i,j,k ≤ 2^n-1. So Little C wants to solve this excellent problem (because it's well related to 3) excellently.

Help him calculate all c_i. Little C loves 3 very much, so he only want to know each c_i \& 3.

Input

The first line contains one integer n (0 ≤ n ≤ 21).

The second line contains 2^n integers in [0,3] without spaces — the i-th of them is a_{i-1}.

The third line contains 2^n integers in [0,3] without spaces — the i-th of them is b_{i-1}.

Output

Print one line contains 2^n integers in [0,3] without spaces — the i-th of them is c_{i-1}\&3. (It's obvious that c_{i}\&3 is in [0,3]).

Examples

Input

1
11
11


Output

12

Input

2
0123
3210


Output

0322
#include <bits/stdc++.h>
namespace MyMinMax {
template <typename T>
inline T mn(const T x, const T y) {
  return x < y ? x : y;
}
template <typename T>
inline T mx(const T x, const T y) {
  return x > y ? x : y;
}
template <typename T>
inline bool chmin(T &x, const T y) {
  return (x > y) && ((x = y), 1);
}
template <typename T>
inline bool chmax(T &x, const T y) {
  return (x < y) && ((x = y), 1);
}
template <typename T, typename... Args>
inline T mx(const T x, const Args... args) {
  return mx(x, mx(args...));
}
template <typename T, typename... Args>
inline T mn(const T x, const Args... args) {
  return mn(x, mn(args...));
}
}  // namespace MyMinMax
using namespace MyMinMax;
namespace IO {
const int DPAIRSIZ = 1 << 18;
char BB[DPAIRSIZ], *SS = BB, *TT = BB;
inline char getcha() {
  return SS == TT && (TT = (SS = BB) + fread(BB, 1, DPAIRSIZ, stdin), SS == TT)
             ? EOF
             : *SS++;
}
template <typename T = int>
inline T read() {
  T x = 0;
  int fu = 1;
  char c = getcha();
  while (c > 57 || c < 48) {
    if (c == 45) fu = -1;
    c = getcha();
  }
  while (c <= 57 && c >= 48) {
    x = x * 10 + c - 48;
    c = getcha();
  }
  x *= fu;
  return x;
}
template <typename T>
inline void read(T &x) {
  x = 0;
  int fu = 1;
  char c = getcha();
  while (c > 57 || c < 48) {
    if (c == 45) fu = -1;
    c = getcha();
  }
  while (c <= 57 && c >= 48) {
    x = x * 10 + c - 48;
    c = getcha();
  }
  x *= fu;
}
template <typename T>
inline void read(T *bg, T *ed) {
  while (bg != ed) read(*bg++);
}
inline void read(char &ch) {
  ch = getcha();
  while (ch <= 32) ch = getcha();
}
inline void read(char *s) {
  char ch = getcha();
  while (ch <= 32) ch = getcha();
  while (ch > 32) *s++ = ch, ch = getcha();
  *s = '\0';
}
inline void sread(char *s) {
  char ch = getcha();
  while (ch < 32) ch = getcha();
  while (ch >= 32) *s++ = ch, ch = getcha();
  *s = '\0';
}
inline void pread(char *&s) {
  char ch = getcha();
  while (ch <= 32) ch = getcha();
  while (ch > 32) *s++ = ch, ch = getcha();
  *s = '\0';
}
inline void spread(char *&s) {
  char ch = getcha();
  while (ch < 32) ch = getcha();
  while (ch >= 32) *s++ = ch, ch = getcha();
  *s = '\0';
}
template <typename T, typename... Args>
inline void read(T &x, Args &...args) {
  read(x);
  read(args...);
}
char out[DPAIRSIZ], *Out = out;
inline void putcha(char x) {
  *Out++ = x;
  if (Out - out >= (DPAIRSIZ)) fwrite(out, 1, Out - out, stdout), Out = out;
}
template <typename T>
inline void fprint(T x) {
  if (x < 0) putcha(45), x = -x;
  if (x > 9) fprint(x / 10);
  putcha(x % 10 + 48);
}
inline void print() { putcha(10); }
template <typename T>
inline void print(T x) {
  fprint(x);
  putcha(10);
}
inline void print(char *ch) {
  while (*ch != '\0') putcha(*(ch++));
  putcha(10);
}
inline void put(char *ch) {
  while (*ch != '\0') putcha(*(ch++));
}
inline void print(const char *ch) {
  while (*ch != '\0') putcha(*(ch++));
  putcha(10);
}
inline void put(const char *ch) {
  while (*ch != '\0') putcha(*(ch++));
}
template <typename T, typename... Args>
inline void print(T x, Args... args) {
  fprint(x);
  putcha(32);
  print(args...);
}
template <typename... Args>
inline void print(const char *ch, Args... args) {
  while (*ch != '\0') putcha(*(ch++));
  putcha(32);
  print(args...);
}
template <typename... Args>
inline void print(char *ch, Args... args) {
  while (*ch != '\0') putcha(*(ch++));
  putcha(32);
  print(args...);
}
template <typename T, typename... Args>
inline void printl(T x, Args... args) {
  fprint(x);
  putcha(10);
  printl(args...);
}
template <typename... Args>
inline void printl(const char *ch, Args... args) {
  while (*ch != '\0') putcha(*(ch++));
  putcha(10);
  printl(args...);
}
template <typename... Args>
inline void printl(char *ch, Args... args) {
  while (*ch != '\0') putcha(*(ch++));
  putcha(10);
  printl(args...);
}
template <typename T>
inline void sprint(T x) {
  fprint(x);
  putcha(32);
}
template <typename T, typename... Args>
inline void sprint(T x, Args... args) {
  fprint(x);
  putcha(32);
  sprint(args...);
}
template <typename T>
inline void sprint(T *bg, T *ed) {
  while (bg != ed) sprint(*bg++);
}
template <typename T>
inline void print(T *bg, T *ed) {
  while (bg != ed) sprint(*bg++);
  putcha(10);
}
template <typename T>
inline void printl(T *bg, T *ed) {
  while (bg != ed) print(*bg++);
}
class AutoFlush {
 public:
  ~AutoFlush() { fwrite(out, 1, Out - out, stdout); }
} __AutoFlush;
}  // namespace IO
using namespace IO;
const int INF = 0x3f3f3f3f;
const long long INFll = 0x3f3f3f3f3f3f3f3fll;
const int MAXN = 1 << 21 | 5;
int n, lim;
unsigned long long a[MAXN], b[MAXN];
template <bool opt>
inline void FWT(unsigned long long *a) {
  for (int mid = 1; mid < lim; mid <<= 1) {
    for (int j = 0; j < lim; j += (mid << 1)) {
      for (int k = (0), kEND = (mid); k < kEND; ++k) {
        if constexpr (opt)
          a[j | mid | k] += a[j | k];
        else
          a[j | mid | k] -= a[j | k];
      }
    }
  }
}
signed main() {
  read(n);
  lim = 1 << n;
  char ch = getcha();
  while (ch <= 32) ch = getcha();
  for (int i = (0), iEND = (lim); i < iEND; ++i)
    a[i] = (1ull << (__builtin_popcount(i) << 1)) * (ch - 48), ch = getcha();
  while (ch <= 32) ch = getcha();
  for (int i = (0), iEND = (lim); i < iEND; ++i)
    b[i] = (1ull << (__builtin_popcount(i) << 1)) * (ch - 48), ch = getcha();
  FWT<1>(a);
  FWT<1>(b);
  for (int i = (0), iEND = (lim); i < iEND; ++i) a[i] = a[i] * b[i];
  FWT<0>(a);
  for (int i = (0), iEND = (lim); i < iEND; ++i)
    putcha(((a[i] >> (__builtin_popcount(i) << 1)) & 3) + 48);
}
