#include <bits/stdc++.h>
const int N = 4096;
int k, n, a[N], b[N], sum, p[N], ip[N], q[N];
void maintain(int i, int j) {
  int x = p[i] ^ q[i] ^ b[i], t = ip[p[i] ^ x];
  if (!x) return;
  std::swap(p[i], p[t]);
  std::swap(q[t], q[j]);
  std::swap(ip[p[i]], ip[p[t]]);
  maintain(t, j);
}
int main() {
  std::ios::sync_with_stdio(0), std::cin.tie(0);
  std::cin >> k, n = 1 << k;
  for (int i = 0; i < n; ++i) std::cin >> a[i], sum ^= a[i];
  if (sum) return std::cout << "Fou\n", 0;
  std::cout << "Shi\n";
  for (int i = 0; i < n; ++i) p[i] = ip[i] = q[i] = i;
  for (int i = 0; i < n - 1; ++i)
    b[i + 1] ^= b[i] ^ a[i], b[i] = a[i], maintain(i, i + 1);
  for (int i = 0; i < n; ++i) std::cout << p[i] << ' ';
  std::cout << '\n';
  for (int i = 0; i < n; ++i) std::cout << q[i] << ' ';
  std::cout << '\n';
  return 0;
}
