#include <bits/stdc++.h>
using std::swap;
int n, a[10010], b[10010], c[10010], pa[10010], pb[10010], now;
int main() {
  scanf("%d", &n);
  n = 1 << n;
  for (int i = 0; i < n; i++)
    scanf("%d", &c[i]), a[i] = b[i] = pa[i] = pb[i] = i, now ^= c[i];
  if (now != 0) return puts("Fou"), 0;
  puts("Shi");
  for (int i = 0; i < n; i++)
    for (int j = i; (a[j] ^ b[j]) != c[j];) {
      int x = pa[c[j] ^ b[j]];
      swap(a[j], a[x]);
      swap(pa[a[j]], pa[a[x]]);
      if (x > i) break;
      swap(b[x], b[i + 1]);
      swap(pb[b[x]], pb[b[i + 1]]);
      j = x;
    }
  for (int i = 0; i < n; i++) printf("%d ", a[i]);
  puts("");
  for (int i = 0; i < n; i++) printf("%d ", b[i]);
}
