#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
string to_string(string s) { return '"' + s + '"'; }
string to_string(const char *s) { return to_string((string)s); }
string to_string(bool b) { return (b ? "true" : "false"); }
template <typename A, typename B>
string to_string(pair<A, B> p) {
  return "(" + to_string(p.first) + ", " + to_string(p.second) + ")";
}
template <typename A>
string to_string(A v) {
  bool first = true;
  string res = "{";
  for (const auto &x : v) {
    if (!first) {
      res += ", ";
    }
    first = false;
    res += to_string(x);
  }
  res += "}";
  return res;
}
void debug_out() { cerr << endl; }
template <typename Head, typename... Tail>
void debug_out(Head H, Tail... T) {
  cerr << " " << to_string(H);
  debug_out(T...);
}
long long mod_1097(long long a) {
  long long mod_a;
  if (a > 1000000007) {
    mod_a = a % 1000000007;
  } else {
    mod_a = a;
  }
  return mod_a;
}
long long calc_good(vector<long long> &a, int i, int b_length,
                    vector<map<int, int>> &cache) {
  if (cache[i].find(b_length) != cache[i].end()) {
    return cache[i][b_length];
  }
  long long good_count = 0;
  for (int j = i; j < a.size(); j++) {
    if ((a[j] % (b_length + 1)) == 0) {
      good_count += 1;
      good_count += calc_good(a, j + 1, b_length + 1, cache);
      good_count = mod_1097(good_count);
    }
  }
  cache[i][b_length] = good_count;
  return good_count;
}
vector<long long> get_primes(long long n) {
  vector<long long> primes = {};
  vector<long long> nums(n, 0);
  for (long long i = 2; i < n; i++) {
    if (nums[i] == 0) {
      primes.push_back(i);
      for (long long j = i * 2; j < n; j += i) {
        nums[j] = i;
      }
    }
  }
  return primes;
}
vector<long long> sieve(long long n) {
  vector<long long> res(n + 1, 0);
  res[n] = n;
  for (int i = 2; i < pow(n, 1 / 2); i++) {
    long long shuttle = i * i;
    while (shuttle < n) {
      res[shuttle] = i;
      shuttle += i;
    }
  }
  return res;
}
long long ceil_(long long a, long long b) {
  if (a % b == 0) {
    return a / b;
  } else {
    return a / b + 1;
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  long long n;
  cin >> n;
  long long q = 2 * n - 2;
  vector<string> a(q);
  vector<vector<long long>> ind(n - 1, vector<long long>());
  for (int i = 0; i < q; i++) {
    cin >> a[i];
    ind[a[i].size() - 1].push_back(i);
  };
  ;
  vector<long long> res(q);
  for (int variant = 0; variant < 4; variant++) {
    long long small_ind_1 = ind[0][0];
    long long small_ind_2 = ind[0][1];
    long long big_ind_1 = ind[n - 2][0];
    long long big_ind_2 = ind[n - 2][1];
    string s;
    if (variant == 0) {
      s = a[small_ind_1] + a[big_ind_1];
    } else if (variant == 1) {
      s = a[small_ind_1] + a[big_ind_2];
    } else if (variant == 2) {
      s = a[small_ind_2] + a[big_ind_1];
    } else if (variant == 3) {
      s = a[small_ind_2] + a[big_ind_2];
    };
    ;
    bool good_s = true;
    for (int i = 0; i < (n - 1) / 2; i++) {
      small_ind_1 = ind[i][0];
      small_ind_2 = ind[i][1];
      big_ind_1 = ind[n - i - 2][0];
      big_ind_2 = ind[n - i - 2][1];
      if ((a[small_ind_1] + a[big_ind_1] == s) &&
          (a[small_ind_1] + a[big_ind_1]) == (a[big_ind_2] + a[small_ind_2])) {
        res[small_ind_1] = -1;
        res[big_ind_1] = 1;
        res[big_ind_2] = -1;
        res[small_ind_2] = 1;
      } else if ((a[small_ind_1] + a[big_ind_2] == s) &&
                 (a[small_ind_1] + a[big_ind_2]) ==
                     (a[big_ind_1] + a[small_ind_2])) {
        res[small_ind_1] = -1;
        res[big_ind_2] = 1;
        res[big_ind_1] = -1;
        res[small_ind_2] = 1;
      } else if ((a[small_ind_2] + a[big_ind_1] == s) &&
                 (a[small_ind_2] + a[big_ind_1]) ==
                     (a[big_ind_2] + a[small_ind_1])) {
        res[small_ind_2] = -1;
        res[big_ind_1] = 1;
        res[big_ind_2] = -1;
        res[small_ind_1] = 1;
      } else if ((a[small_ind_2] + a[big_ind_2] == s) &&
                 (a[small_ind_2] + a[big_ind_2]) ==
                     (a[big_ind_1] + a[small_ind_1])) {
        res[small_ind_2] = -1;
        res[big_ind_2] = 1;
        res[big_ind_1] = -1;
        res[small_ind_1] = 1;
      } else {
        good_s = false;
        break;
      }
    }
    if ((good_s) && ((n % 2) == 0)) {
      small_ind_1 = ind[(n - 2) / 2][0];
      small_ind_2 = ind[(n - 2) / 2][1];
      if (s == (a[small_ind_1] + a[small_ind_2])) {
        res[small_ind_1] = -1;
        res[small_ind_2] = 1;
      } else if (s == (a[small_ind_2] + a[small_ind_1])) {
        res[small_ind_1] = 1;
        res[small_ind_2] = -1;
      } else {
        good_s = false;
      }
    }
    if (good_s) {
      break;
    }
  };
  ;
  for (int i = 0; i < q; i++) {
    if (res[i] == -1) {
      cout << 'P';
    } else {
      cout << 'S';
    }
  }
  cout << endl;
  return 0;
}
