#include <bits/stdc++.h>
int main() {
  static int aa[4096], pp[4096], qq[4096], ii[4096];
  int n, k, i, u, v, tmp, a;
  scanf("%d", &k);
  n = 1 << k;
  a = 0;
  for (i = 0; i < n; i++) {
    scanf("%d", &aa[i]);
    a ^= aa[i];
  }
  if (a) {
    printf("Fou\n");
    return 0;
  }
  for (i = 0; i < n; i++) pp[i] = qq[i] = ii[i] = i;
  for (i = 0; i < n - 1; i++)
    for (u = i; u <= i && aa[u] ^ pp[u] ^ qq[u]; u = v) {
      v = ii[aa[u] ^ pp[u]];
      tmp = qq[u], qq[u] = qq[v], qq[v] = tmp;
      tmp = ii[qq[u]], ii[qq[u]] = ii[qq[v]], ii[qq[v]] = tmp;
      tmp = pp[v], pp[v] = pp[n - 1], pp[n - 1] = tmp;
    }
  printf("Shi\n");
  for (i = 0; i < n; i++) printf("%d ", pp[i]);
  printf("\n");
  for (i = 0; i < n; i++) printf("%d ", qq[i]);
  printf("\n");
  return 0;
}
