#include <bits/stdc++.h>
using namespace std;
int main() {
  const int N = 5000;
  static int p[N], q[N], r[N], s[N];
  int n, f = 0;
  scanf("%d", &n);
  n = 1 << n;
  for (int i = 0; i < n; i++) {
    scanf("%d", r + i);
    f ^= r[i];
    p[i] = i;
    q[i] = i;
    s[i] = i;
  }
  if (f) {
    puts("Fou");
    return 0;
  }
  for (int i = 0; i < n; i++) {
    for (int j = i, k; (p[j] ^ q[j]) != r[j]; j = k) {
      k = s[r[j] ^ q[j]];
      swap(s[p[j]], s[p[k]]);
      swap(p[j], p[k]);
      if (k > i) {
        break;
      }
      swap(q[k], q[i + 1]);
    }
  }
  puts("Shi");
  for (int i = 0; i < n; i++) {
    printf("%d ", p[i]);
  }
  puts("");
  for (int i = 0; i < n; i++) {
    printf("%d ", q[i]);
  }
  puts("");
}
