#include <bits/stdc++.h>
int n, p[1 << 12], q[1 << 12], a[1 << 12], v[1 << 12], bel[1 << 12], d;
void fix(int x, int y) {
  int d = q[x] ^ v[x], t = bel[d];
  if (t == x) return;
  if (t == y) {
    std::swap(p[x], p[y]), std::swap(bel[p[x]], bel[p[y]]);
    return;
  }
  std::swap(bel[d], bel[p[x]]);
  std::swap(p[t], p[x]), std::swap(q[t], q[y]), fix(t, y);
}
int main() {
  scanf("%d", &n);
  n = 1 << n;
  for (int i = 0; i < n; i++)
    scanf("%d", a + i), d ^= a[i], p[i] = q[i] = bel[i] = i;
  if (d) return puts("Fou");
  puts("Shi");
  for (int i = 0; i < n - 1; i++)
    if (v[i] ^ a[i]) {
      int x = v[i] ^ a[i];
      v[i] ^= x, v[i + 1] ^= x;
      fix(i, i + 1);
    }
  for (int i = 0; i < n; i++) printf("%d ", p[i]);
  puts("");
  for (int i = 0; i < n; i++) printf("%d ", q[i]);
  puts("");
  return 0;
}
