import java.util.Scanner;

public class Main{

	public static void main(String[] args) {

/*		int card[][] = {	{1,2,3,4,5,6,7,8,9,10,11,12,13},
							{1,2,3,4,5,6,7,8,9,10,11,12,13},
							{1,2,3,4,5,6,7,8,9,10,11,12,13},
							{1,2,3,4,5,6,7,8,9,10,11,12,13},	};*/

		boolean card[][] = new boolean[4][13];
		int n,x=0,y;
		String str;
		char ch = 0;

		Scanner scan = new Scanner(System.in);

		n = scan.nextInt();

		for(int i=0; i<n; i++)
		{
			str = scan.next();
			y = scan.nextInt();

			switch(str)
			{
				case "S":
					x = 0;
					break;
				case "H":
					x = 1;
					break;
				case "C":
					x = 2;
					break;
				case "D":
					x = 3;
					break;

				default:
			}

			card[x][y-1] = true;
		}

		for(int i=0; i<4; i++)
		{
			for(int j=0; j<13; j++)
			{
				if(card[i][j] == false)
				{
					if(i==0) ch = 'S';
					else if(i==1) ch = 'H';
					else if(i==2) ch = 'C';
					else if(i==3) ch = 'D';

					System.out.printf("%c %d\n",ch,j+1);
				}
			}

			//System.out.println();
		}

		scan.close();
	}
} import java.util.Scanner; Scanner java.util public class Main{

	public static void main(String[] args) {

/*		int card[][] = {	{1,2,3,4,5,6,7,8,9,10,11,12,13},
							{1,2,3,4,5,6,7,8,9,10,11,12,13},
							{1,2,3,4,5,6,7,8,9,10,11,12,13},
							{1,2,3,4,5,6,7,8,9,10,11,12,13},	};*/

		boolean card[][] = new boolean[4][13];
		int n,x=0,y;
		String str;
		char ch = 0;

		Scanner scan = new Scanner(System.in);

		n = scan.nextInt();

		for(int i=0; i<n; i++)
		{
			str = scan.next();
			y = scan.nextInt();

			switch(str)
			{
				case "S":
					x = 0;
					break;
				case "H":
					x = 1;
					break;
				case "C":
					x = 2;
					break;
				case "D":
					x = 3;
					break;

				default:
			}

			card[x][y-1] = true;
		}

		for(int i=0; i<4; i++)
		{
			for(int j=0; j<13; j++)
			{
				if(card[i][j] == false)
				{
					if(i==0) ch = 'S';
					else if(i==1) ch = 'H';
					else if(i==2) ch = 'C';
					else if(i==3) ch = 'D';

					System.out.printf("%c %d\n",ch,j+1);
				}
			}

			//System.out.println();
		}

		scan.close();
	}
} Main public static void main(String[] args) {

/*		int card[][] = {	{1,2,3,4,5,6,7,8,9,10,11,12,13},
							{1,2,3,4,5,6,7,8,9,10,11,12,13},
							{1,2,3,4,5,6,7,8,9,10,11,12,13},
							{1,2,3,4,5,6,7,8,9,10,11,12,13},	};*/

		boolean card[][] = new boolean[4][13];
		int n,x=0,y;
		String str;
		char ch = 0;

		Scanner scan = new Scanner(System.in);

		n = scan.nextInt();

		for(int i=0; i<n; i++)
		{
			str = scan.next();
			y = scan.nextInt();

			switch(str)
			{
				case "S":
					x = 0;
					break;
				case "H":
					x = 1;
					break;
				case "C":
					x = 2;
					break;
				case "D":
					x = 3;
					break;

				default:
			}

			card[x][y-1] = true;
		}

		for(int i=0; i<4; i++)
		{
			for(int j=0; j<13; j++)
			{
				if(card[i][j] == false)
				{
					if(i==0) ch = 'S';
					else if(i==1) ch = 'H';
					else if(i==2) ch = 'C';
					else if(i==3) ch = 'D';

					System.out.printf("%c %d\n",ch,j+1);
				}
			}

			//System.out.println();
		}

		scan.close();
	} main {

/*		int card[][] = {	{1,2,3,4,5,6,7,8,9,10,11,12,13},
							{1,2,3,4,5,6,7,8,9,10,11,12,13},
							{1,2,3,4,5,6,7,8,9,10,11,12,13},
							{1,2,3,4,5,6,7,8,9,10,11,12,13},	};*/

		boolean card[][] = new boolean[4][13];
		int n,x=0,y;
		String str;
		char ch = 0;

		Scanner scan = new Scanner(System.in);

		n = scan.nextInt();

		for(int i=0; i<n; i++)
		{
			str = scan.next();
			y = scan.nextInt();

			switch(str)
			{
				case "S":
					x = 0;
					break;
				case "H":
					x = 1;
					break;
				case "C":
					x = 2;
					break;
				case "D":
					x = 3;
					break;

				default:
			}

			card[x][y-1] = true;
		}

		for(int i=0; i<4; i++)
		{
			for(int j=0; j<13; j++)
			{
				if(card[i][j] == false)
				{
					if(i==0) ch = 'S';
					else if(i==1) ch = 'H';
					else if(i==2) ch = 'C';
					else if(i==3) ch = 'D';

					System.out.printf("%c %d\n",ch,j+1);
				}
			}

			//System.out.println();
		}

		scan.close();
	} boolean card[][] = new boolean[4][13]; card new boolean[4][13] 4 13 int n n x=0 x 0 y; y String str; str char ch = 0; ch 0 Scanner scan = new Scanner(System.in); scan new Scanner(System.in) n = scan.nextInt() n scan.nextInt() scan.nextInt scan for(int i=0; i<n; i++)
		{
			str = scan.next();
			y = scan.nextInt();

			switch(str)
			{
				case "S":
					x = 0;
					break;
				case "H":
					x = 1;
					break;
				case "C":
					x = 2;
					break;
				case "D":
					x = 3;
					break;

				default:
			}

			card[x][y-1] = true;
		} int i=0; int i=0; i 0 i<n i n i++ i++ i {
			str = scan.next();
			y = scan.nextInt();

			switch(str)
			{
				case "S":
					x = 0;
					break;
				case "H":
					x = 1;
					break;
				case "C":
					x = 2;
					break;
				case "D":
					x = 3;
					break;

				default:
			}

			card[x][y-1] = true;
		} {
			str = scan.next();
			y = scan.nextInt();

			switch(str)
			{
				case "S":
					x = 0;
					break;
				case "H":
					x = 1;
					break;
				case "C":
					x = 2;
					break;
				case "D":
					x = 3;
					break;

				default:
			}

			card[x][y-1] = true;
		} str = scan.next() str scan.next() scan.next scan y = scan.nextInt() y scan.nextInt() scan.nextInt scan switch(str)
			{
				case "S":
					x = 0;
					break;
				case "H":
					x = 1;
					break;
				case "C":
					x = 2;
					break;
				case "D":
					x = 3;
					break;

				default:
			} str case "S": "S" case "S": x = 0 x 0 break; case "H": "H" case "H": x = 1 x 1 break; case "C": "C" case "C": x = 2 x 2 break; case "D": "D" case "D": x = 3 x 3 break; default: default: card[x][y-1] = true card[x][y-1] card[x] card x y-1 y 1 true for(int i=0; i<4; i++)
		{
			for(int j=0; j<13; j++)
			{
				if(card[i][j] == false)
				{
					if(i==0) ch = 'S';
					else if(i==1) ch = 'H';
					else if(i==2) ch = 'C';
					else if(i==3) ch = 'D';

					System.out.printf("%c %d\n",ch,j+1);
				}
			}

			//System.out.println();
		} int i=0; int i=0; i 0 i<4 i 4 i++ i++ i {
			for(int j=0; j<13; j++)
			{
				if(card[i][j] == false)
				{
					if(i==0) ch = 'S';
					else if(i==1) ch = 'H';
					else if(i==2) ch = 'C';
					else if(i==3) ch = 'D';

					System.out.printf("%c %d\n",ch,j+1);
				}
			}

			//System.out.println();
		} {
			for(int j=0; j<13; j++)
			{
				if(card[i][j] == false)
				{
					if(i==0) ch = 'S';
					else if(i==1) ch = 'H';
					else if(i==2) ch = 'C';
					else if(i==3) ch = 'D';

					System.out.printf("%c %d\n",ch,j+1);
				}
			}

			//System.out.println();
		} for(int j=0; j<13; j++)
			{
				if(card[i][j] == false)
				{
					if(i==0) ch = 'S';
					else if(i==1) ch = 'H';
					else if(i==2) ch = 'C';
					else if(i==3) ch = 'D';

					System.out.printf("%c %d\n",ch,j+1);
				}
			} int j=0; int j=0; j 0 j<13 j 13 j++ j++ j {
				if(card[i][j] == false)
				{
					if(i==0) ch = 'S';
					else if(i==1) ch = 'H';
					else if(i==2) ch = 'C';
					else if(i==3) ch = 'D';

					System.out.printf("%c %d\n",ch,j+1);
				}
			} {
				if(card[i][j] == false)
				{
					if(i==0) ch = 'S';
					else if(i==1) ch = 'H';
					else if(i==2) ch = 'C';
					else if(i==3) ch = 'D';

					System.out.printf("%c %d\n",ch,j+1);
				}
			} if(card[i][j] == false)
				{
					if(i==0) ch = 'S';
					else if(i==1) ch = 'H';
					else if(i==2) ch = 'C';
					else if(i==3) ch = 'D';

					System.out.printf("%c %d\n",ch,j+1);
				} card[i][j] == false card[i][j] card[i] card i j false {
					if(i==0) ch = 'S';
					else if(i==1) ch = 'H';
					else if(i==2) ch = 'C';
					else if(i==3) ch = 'D';

					System.out.printf("%c %d\n",ch,j+1);
				} if(i==0) ch = 'S';
					else if(i==1) ch = 'H';
					else if(i==2) ch = 'C';
					else if(i==3) ch = 'D'; i==0 i 0 ch = 'S' ch 'S' if(i==1) ch = 'H';
					else if(i==2) ch = 'C';
					else if(i==3) ch = 'D'; i==1 i 1 ch = 'H' ch 'H' if(i==2) ch = 'C';
					else if(i==3) ch = 'D'; i==2 i 2 ch = 'C' ch 'C' if(i==3) ch = 'D'; i==3 i 3 ch = 'D' ch 'D' System.out.printf("%c %d\n",ch,j+1) System.out.printf System.out System System.out "%c %d\n" ch j+1 j 1 scan.close() scan.close scan String[] args args public class Main{

	public static void main(String[] args) {

/*		int card[][] = {	{1,2,3,4,5,6,7,8,9,10,11,12,13},
							{1,2,3,4,5,6,7,8,9,10,11,12,13},
							{1,2,3,4,5,6,7,8,9,10,11,12,13},
							{1,2,3,4,5,6,7,8,9,10,11,12,13},	};*/

		boolean card[][] = new boolean[4][13];
		int n,x=0,y;
		String str;
		char ch = 0;

		Scanner scan = new Scanner(System.in);

		n = scan.nextInt();

		for(int i=0; i<n; i++)
		{
			str = scan.next();
			y = scan.nextInt();

			switch(str)
			{
				case "S":
					x = 0;
					break;
				case "H":
					x = 1;
					break;
				case "C":
					x = 2;
					break;
				case "D":
					x = 3;
					break;

				default:
			}

			card[x][y-1] = true;
		}

		for(int i=0; i<4; i++)
		{
			for(int j=0; j<13; j++)
			{
				if(card[i][j] == false)
				{
					if(i==0) ch = 'S';
					else if(i==1) ch = 'H';
					else if(i==2) ch = 'C';
					else if(i==3) ch = 'D';

					System.out.printf("%c %d\n",ch,j+1);
				}
			}

			//System.out.println();
		}

		scan.close();
	}
} public class Main{

	public static void main(String[] args) {

/*		int card[][] = {	{1,2,3,4,5,6,7,8,9,10,11,12,13},
							{1,2,3,4,5,6,7,8,9,10,11,12,13},
							{1,2,3,4,5,6,7,8,9,10,11,12,13},
							{1,2,3,4,5,6,7,8,9,10,11,12,13},	};*/

		boolean card[][] = new boolean[4][13];
		int n,x=0,y;
		String str;
		char ch = 0;

		Scanner scan = new Scanner(System.in);

		n = scan.nextInt();

		for(int i=0; i<n; i++)
		{
			str = scan.next();
			y = scan.nextInt();

			switch(str)
			{
				case "S":
					x = 0;
					break;
				case "H":
					x = 1;
					break;
				case "C":
					x = 2;
					break;
				case "D":
					x = 3;
					break;

				default:
			}

			card[x][y-1] = true;
		}

		for(int i=0; i<4; i++)
		{
			for(int j=0; j<13; j++)
			{
				if(card[i][j] == false)
				{
					if(i==0) ch = 'S';
					else if(i==1) ch = 'H';
					else if(i==2) ch = 'C';
					else if(i==3) ch = 'D';

					System.out.printf("%c %d\n",ch,j+1);
				}
			}

			//System.out.println();
		}

		scan.close();
	}
} Main
import java.util.Scanner;

public class Main{

	public static void main(String[] args) {

/*		int card[][] = {	{1,2,3,4,5,6,7,8,9,10,11,12,13},
							{1,2,3,4,5,6,7,8,9,10,11,12,13},
							{1,2,3,4,5,6,7,8,9,10,11,12,13},
							{1,2,3,4,5,6,7,8,9,10,11,12,13},	};*/

		boolean card[][] = new boolean[4][13];
		int n,x=0,y;
		String str;
		char ch = 0;

		Scanner scan = new Scanner(System.in);

		n = scan.nextInt();

		for(int i=0; i<n; i++)
		{
			str = scan.next();
			y = scan.nextInt();

			switch(str)
			{
				case "S":
					x = 0;
					break;
				case "H":
					x = 1;
					break;
				case "C":
					x = 2;
					break;
				case "D":
					x = 3;
					break;

				default:
			}

			card[x][y-1] = true;
		}

		for(int i=0; i<4; i++)
		{
			for(int j=0; j<13; j++)
			{
				if(card[i][j] == false)
				{
					if(i==0) ch = 'S';
					else if(i==1) ch = 'H';
					else if(i==2) ch = 'C';
					else if(i==3) ch = 'D';

					System.out.printf("%c %d\n",ch,j+1);
				}
			}

			//System.out.println();
		}

		scan.close();
	}
}