#include<iostream>
using namespace std;
int main()
{
   int n, a, b, i, s[14], h[14], c[14], d[14];
   char surt;
   for ( i = 0; i < 14; i++)s[i] = 0;
   for ( i = 0; i < 14; i++)h[i] = 0;
   for ( i = 0; i < 14; i++)c[i] = 0;
   for ( i = 0; i < 14; i++)d[i] = 0;
   cin >> n;
   for ( i = 0; i < n; i++ )
   {
      cin >> surt >> a;
      if ( surt == S )s[a] = 1;
      if ( surt == H )h[a] = 1;
      if ( surt == C )c[a] = 1;
      if ( surt == D )d[a] = 1;  
   }
   for ( i = 0; i < 13; i++)
   {
      if ( s[i] == 0 )cout << "S " << (i + 1) << endl; 
   }
for ( i = 0; i < 13; i++)
   {
      if ( h[i] == 0 )cout << "H " << (i + 1) << endl; 
   }
for ( i = 0; i < 13; i++)
   {
      if ( c[i] == 0 )cout << "C " << (i + 1) << endl; 
   }
for ( i = 0; i < 13; i++)
   {
      if ( d[i] == 0 )cout << "D " << (i + 1) << endl; 
   }
return 0;
}