#include <bits/stdc++.h>
using namespace std;
int n, p[5000], q[5000], d[5000], bel[5000], a[5000];
void work(int x, int y) {
  int tmp = q[x] ^ d[x];
  if (bel[tmp] == x) return;
  if (bel[tmp] == y) {
    swap(p[x], p[y]), swap(bel[p[x]], bel[p[y]]);
    return;
  }
  int pos = bel[tmp];
  swap(bel[tmp], bel[p[x]]);
  swap(p[pos], p[x]);
  swap(q[pos], q[y]);
  work(pos, y);
}
int main() {
  scanf("%d", &n);
  n = 1 << n;
  int sum = 0;
  for (int i = 1; i <= n; i++)
    scanf("%d", &a[i]), p[i] = q[i] = i - 1, bel[i - 1] = i, sum ^= a[i],
                        d[i] = 0;
  if (sum) return puts("Fou"), 0;
  for (int i = 1; i < n; i++) {
    if (a[i] != d[i]) {
      d[i + 1] ^= (a[i] ^ d[i]);
      d[i] = a[i];
      work(i, i + 1);
    }
  }
  puts("Shi");
  for (int i = 1; i <= n; i++) printf("%d ", p[i]);
  puts("");
  for (int i = 1; i <= n; i++) printf("%d ", q[i]);
  puts("");
}
