#include <bits/stdc++.h>
using namespace std;
const int N = 1 << 12 | 1;
int n, a[N], b[N], c[N], d[N], to[N];
inline void fix(int x, int y) {
  int val = d[x] ^ c[x], k = to[val];
  if (k == x) return;
  if (k == y) {
    swap(b[x], b[y]);
    swap(to[b[x]], to[b[y]]);
    return;
  }
  swap(b[x], b[k]);
  swap(c[k], c[y]);
  swap(to[b[x]], to[b[k]]);
  fix(k, y);
}
int main() {
  scanf("%d", &n);
  n = 1 << n;
  int sum = 0;
  for (int i = 0; i < n; i++) scanf("%d", &a[i]), sum ^= a[i];
  if (sum != 0) {
    puts("Fou");
    return 0;
  }
  puts("Shi");
  for (int i = 0; i < n; i++) b[i] = c[i] = i, d[i] = 0, to[i] = i;
  for (int i = 0; i < n; i++)
    if (d[i] != a[i]) {
      d[i + 1] ^= d[i] ^ a[i];
      d[i] = a[i];
      fix(i, i + 1);
    }
  for (int i = 0; i < n; i++) printf("%d ", b[i]);
  puts("");
  for (int i = 0; i < n; i++) printf("%d ", c[i]);
}
