#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  char card;
  int num;
  int S[14] = {0};
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> card;
    cin >> num;
    if (card == 'S') {
      S[num] = 1;
    }
  }
  for (int i = 1; i <= 13; i++) {
    if (S[i] == 0) {
      cout << "S " << i << endl;
    }
  }
  return (0);
}
