#include <bits/stdc++.h>
using namespace std;
const int NN = 1 << 12;
int n;
int a[NN], b[NN], c[NN];
int pos[NN];
int main() {
  cin >> n;
  n = 1 << n;
  int tot = 0;
  for (int i = 0; i < n; i++) cin >> c[i], tot ^= c[i];
  if (tot) return puts("Fou");
  puts("Shi");
  for (int i = 0; i < n; i++) a[i] = b[i] = pos[i] = i;
  for (int i = 0; i < n; i++) {
    int u = i, v;
    while ((a[u] ^ b[u]) != c[u]) {
      int v = pos[c[u] ^ b[u]];
      swap(a[u], a[v]);
      swap(pos[a[u]], pos[a[v]]);
      if (v > i) break;
      swap(b[v], b[i + 1]);
      u = v;
    }
  }
  for (int i = 0; i < n; i++) cout << a[i] << ' ';
  cout << endl;
  for (int i = 0; i < n; i++) cout << b[i] << ' ';
  cout << endl;
}
