#include <bits/stdc++.h>
using namespace std;
int a[1 << 12], p[1 << 12], q[1 << 12], pos[1 << 12];
int main() {
  int i;
  int k, x = 0;
  scanf("%d", &k);
  for (i = 0; i < (1 << k); i++) scanf("%d", &a[i]), x ^= a[i];
  if (x != 0) {
    printf("Fou\n");
    return 0;
  }
  for (i = 0; i < (1 << k); i++) p[i] = q[i] = pos[i] = i;
  for (i = 0; i < (1 << k); i++) {
    int u = i;
    while ((a[u] ^ p[u] ^ q[u]) != 0) {
      int v = pos[a[u] ^ q[u]];
      swap(p[u], p[v]), swap(pos[p[u]], pos[p[v]]);
      if (v > i)
        break;
      else
        swap(q[v], q[i + 1]), u = v;
    }
  }
  printf("Shi\n");
  for (i = 0; i < (1 << k); i++) printf("%d ", p[i]);
  printf("\n");
  for (i = 0; i < (1 << k); i++) printf("%d ", q[i]);
  printf("\n");
  return 0;
}
