#include <bits/stdc++.h>
using namespace std;
const int N = 12;
int p[1 << N], q[1 << N], a[1 << N], pos[1 << N], ans[1 << N];
void do_swap(int x, int y) {
  int val = (p[x] ^ q[x] ^ a[x]);
  if (!val) {
    return;
  }
  int idx = pos[a[x] ^ q[x]];
  swap(pos[p[x]], pos[p[idx]]);
  swap(p[x], p[idx]);
  swap(q[y], q[idx]);
  do_swap(idx, y);
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n, i, j, k, l = 0;
  cin >> n;
  n = (1 << n);
  for (i = 0; i < n; i++) {
    cin >> a[i];
    l ^= a[i];
    p[i] = q[i] = pos[i] = i;
  }
  if (l) {
    cout << "Fou";
    return 0;
  }
  for (i = 0; i + 1 < n; i++) {
    do_swap(i, i + 1);
  }
  cout << "Shi\n";
  for (i = 0; i < n; i++) {
    cout << p[i] << ' ';
  }
  cout << '\n';
  for (i = 0; i < n; i++) {
    cout << q[i] << ' ';
  }
}
