#include <bits/stdc++.h>
using namespace std;
int K, N;
vector<int> A, B, C;
vector<int> location;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cin >> K;
  N = 1 << K;
  A.resize(N);
  int all_xor = 0;
  for (auto &a : A) {
    cin >> a;
    all_xor ^= a;
  }
  if (all_xor != 0) {
    cout << "Fou" << '\n';
    return 0;
  }
  B.resize(N);
  C.resize(N);
  for (int i = 0; i < N; i++) B[i] = C[i] = i;
  for (int i = 0; i < N; i++) {
    int u = i;
    while ((A[u] ^ B[u] ^ C[u]) != 0) {
      int v = N - 1;
      while (v >= 0 && C[v] != (A[u] ^ B[u])) v--;
      assert(v >= 0);
      swap(C[u], C[v]);
      if (v > i) {
        break;
      } else {
        swap(B[v], B[i + 1]);
        u = v;
      }
    }
  }
  cout << "Shi" << '\n';
  for (int i = 0; i < N; i++) cout << B[i] << (i < N - 1 ? ' ' : '\n');
  for (int i = 0; i < N; i++) cout << C[i] << (i < N - 1 ? ' ' : '\n');
}
