#include <bits/stdc++.h>
#define pi acos(-1)
#define ll long long
#define ull unsigned long long
#define db double
#define ull unsigned long long
#define MIN INT_MIN
#define MAX INT_MAX
#define Sort(x) sort((x).begin(), (x).end())
#define pb push_back
#define ii pair <int,int>
#define ci pair <char,int>
#define iii pair <int,ii>
#define pll pair <ll,ll>
#define plll pair <ll,pll>
#define ff first
#define ss second
#define minQueue priority_queue <int,vector<int>,greater<int> >
#define maxQueue priority_queue<int,vector<int>,less<int> >
#define pb push_back
#define max3(a,b,c) max(a, max(b,c))
#define min3(a,b,c) min(a, min(b,c))
#define GCD(x,y) __gcd((x), (y))
#define LCM(x,y) ((x / GCD((x), (y))) * y)
#define loop(a,n) for(int i=a; i<n; i++)
#define mem(x,y) memset((x), (y), sizeof (x));
#define Case int T; scanf("%d", &T); for(int cas = 1; cas <= T; ++cas)
#define pf printf
#define sf scanf
#define pr1(x) cout << x << endl
#define pr2(x,y) cout << x << ' ' << y << endl
#define powerOfTwo(x) (x && !(x & (x - 1)))
#define Iterator(type) type <int> :: iterator
#define mapIterator map <int,int> :: iterator //it->ff it->ss
#define FI freopen ("input.txt", "r", stdin)
#define FO freopen ("output.txt", "w", stdout)
#define Ziru 0
using namespace std;
/*int intConvert(string s){
    int n;
    stringstream geek(s);
    geek >> n;
    return n;
}*/

/*string strConvert(int n){
    string s;
    stringstream ss;
    ss << n;
    s=ss.str();
    return s;
}*/

///***********BigMod************************************************************************************
//int StringMod(string num, int a){
//    int res = 0;
//    for (int i = 0; i < num.length(); i++)
//         res = (res*10 + (int)num[i] - '0') %a;
//    return res;
//}

//int BigMod(ll b,ll p, ll m){
//   if(p==0)return 1;
//   else if(p%2==1){
//        int part1=b%m;
//        int part2=BigMod(b,p-1,m);
//        return (part1*part2)%m;
//
//   }
//   else if(p%2==0){
//        int half=BigMod(b,p/2,m);
//        return (half*half)%m;
//   }
//}
///BigMod (89, 14 ,2589)==1849
///StringMod(1956410986640441413344189841, 2589)==1849;


///_________________factorial___________________________________________________________________________

//int multiply(int x, int res[], int res_size);
//
//void factorial(int n){
//    int res[500];
//    res[0] = 1;
//    int res_size = 1;
//    for (int x=2; x<=n; x++)
//        res_size = multiply(x, res, res_size);
//    cout << "Factorial of given number is \n";
//    for (int i=res_size-1; i>=0; i--)
//        cout << res[i];
//}
//int multiply(int x, int res[], int res_size){
//    int carry = 0;
//    for (int i=0; i<res_size; i++){
//        int prod = res[i] * x + carry;
//        res[i] = prod % 10;
//        carry  = prod/10;
//    }
//    while (carry){
//        res[res_size] = carry%10;
//        carry = carry/10;
//        res_size++;
//    }
//    return res_size;
//}


int main(){
    vector <ci> v;

    v.push_back(make_pair('S',1));
    v.push_back(make_pair('S',2));
    v.push_back(make_pair('S',3));
    v.push_back(make_pair('S',4));
    v.push_back(make_pair('S',5));
    v.push_back(make_pair('S',6));
    v.push_back(make_pair('S',7));
    v.push_back(make_pair('S',8));
    v.push_back(make_pair('S',9));
    v.push_back(make_pair('S',10));
    v.push_back(make_pair('S',11));
    v.push_back(make_pair('S',12));
    v.push_back(make_pair('S',13));
    v.push_back(make_pair('H',1));
    v.push_back(make_pair('H',2));
    v.push_back(make_pair('H',3));
    v.push_back(make_pair('H',4));
    v.push_back(make_pair('H',5));
    v.push_back(make_pair('H',6));
    v.push_back(make_pair('H',7));
    v.push_back(make_pair('H',8));
    v.push_back(make_pair('H',9));
    v.push_back(make_pair('H',10));
    v.push_back(make_pair('H',11));
    v.push_back(make_pair('H',12));
    v.push_back(make_pair('H',13));
    v.push_back(make_pair('C',1));
    v.push_back(make_pair('C',2));
    v.push_back(make_pair('C',3));
    v.push_back(make_pair('C',4));
    v.push_back(make_pair('C',5));
    v.push_back(make_pair('C',6));
    v.push_back(make_pair('C',7));
    v.push_back(make_pair('C',8));
    v.push_back(make_pair('C',9));
    v.push_back(make_pair('C',10));
    v.push_back(make_pair('C',11));
    v.push_back(make_pair('C',12));
    v.push_back(make_pair('C',13));
    v.push_back(make_pair('D',1));
    v.push_back(make_pair('D',2));
    v.push_back(make_pair('D',3));
    v.push_back(make_pair('D',4));
    v.push_back(make_pair('D',5));
    v.push_back(make_pair('D',6));
    v.push_back(make_pair('D',7));
    v.push_back(make_pair('D',8));
    v.push_back(make_pair('D',9));
    v.push_back(make_pair('D',10));
    v.push_back(make_pair('D',11));
    v.push_back(make_pair('D',12));
    v.push_back(make_pair('D',13));

    int n;
    cin>>n;

    while(n--){
        char c;
        int a;
        cin>>c>>a;

        for(int i=0; i<52; i++){
            if(v[i].first==c && v[i].second==a) v[i].first='#';
        }
    }

    for(int i=0; i<52; i++){
        if(v[i].first!='#') cout<<v[i].first<<" "<<v[i].second<<endl;
    }

	return Ziru;
}



Measured memory_bytes: 3096