import java.util.ArrayList;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????

		//Scanner????????????????????????
		Scanner scan = new Scanner(System.in);
		//?????°???????????????
		int n = scan.nextInt();

		ArrayList<Integer> sList = new ArrayList<Integer>();
		ArrayList<Integer> hList = new ArrayList<Integer>();
		ArrayList<Integer> cList = new ArrayList<Integer>();
		ArrayList<Integer> dList = new ArrayList<Integer>();
		int intCardVal = 13;
		int[] sAry = new int[intCardVal];
		int[] hAry = new int[intCardVal];
		int[] cAry = new int[intCardVal];
		int[] dAry = new int[intCardVal];
		for(int i = 0; i < intCardVal; i++){
			sAry[i] = 0;
			hAry[i] = 0;
			cAry[i] = 0;
			dAry[i] = 0;
		}

		int intCount = 0;

		while(scan.hasNextLine()){

			String strMark = scan.next();
			int intNum = scan.nextInt();

			if("S".equals(strMark)){

				sAry[intNum - 1] = intNum;

			}else if("H".equals(strMark)){

				hAry[intNum - 1] = intNum;
			}else if("C".equals(strMark)){

				cAry[intNum - 1] = intNum;
			}else if("D".equals(strMark)){

				dAry[intNum - 1] = intNum;
			}

			intCount++;
			if(intCount == n){
				scan.close();
				break;

			}
		}


		//????????????????????£???????????°?????????????????°??????list???????´?
		for(int i = 0; i < intCardVal; i++ ){

			if(sAry[i] == 0 ){

				sList.add( i + 1);
			}
			if(hAry[i] == 0){

				hList.add(i + 1);
			}
			if(cAry[i] == 0){

				cList.add(i + 1);
			}
			if(dAry[i] == 0){

				dList.add(i + 1);
			}
		}


		//??????????????????
		for(int i = 0; i < sList.size(); i++){

			System.out.print("S ");
			System.out.print(sList.get(i));
			System.out.println("");
		}

		//???????????????
		for(int i = 0; i < hList.size(); i++){

			System.out.print("H ");
			System.out.print(hList.get(i));
			System.out.println("");
		}

		//???????????????
		for(int i = 0; i < cList.size(); i++){

			System.out.print("C ");
			System.out.print(cList.get(i));
			System.out.println("");
		}

		//???????????????
		for(int i = 0; i < dList.size(); i++){

			System.out.print("D ");
			System.out.print(dList.get(i));
			System.out.println("");
		}

	}
} import java.util.ArrayList; ArrayList java.util import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????

		//Scanner????????????????????????
		Scanner scan = new Scanner(System.in);
		//?????°???????????????
		int n = scan.nextInt();

		ArrayList<Integer> sList = new ArrayList<Integer>();
		ArrayList<Integer> hList = new ArrayList<Integer>();
		ArrayList<Integer> cList = new ArrayList<Integer>();
		ArrayList<Integer> dList = new ArrayList<Integer>();
		int intCardVal = 13;
		int[] sAry = new int[intCardVal];
		int[] hAry = new int[intCardVal];
		int[] cAry = new int[intCardVal];
		int[] dAry = new int[intCardVal];
		for(int i = 0; i < intCardVal; i++){
			sAry[i] = 0;
			hAry[i] = 0;
			cAry[i] = 0;
			dAry[i] = 0;
		}

		int intCount = 0;

		while(scan.hasNextLine()){

			String strMark = scan.next();
			int intNum = scan.nextInt();

			if("S".equals(strMark)){

				sAry[intNum - 1] = intNum;

			}else if("H".equals(strMark)){

				hAry[intNum - 1] = intNum;
			}else if("C".equals(strMark)){

				cAry[intNum - 1] = intNum;
			}else if("D".equals(strMark)){

				dAry[intNum - 1] = intNum;
			}

			intCount++;
			if(intCount == n){
				scan.close();
				break;

			}
		}


		//????????????????????£???????????°?????????????????°??????list???????´?
		for(int i = 0; i < intCardVal; i++ ){

			if(sAry[i] == 0 ){

				sList.add( i + 1);
			}
			if(hAry[i] == 0){

				hList.add(i + 1);
			}
			if(cAry[i] == 0){

				cList.add(i + 1);
			}
			if(dAry[i] == 0){

				dList.add(i + 1);
			}
		}


		//??????????????????
		for(int i = 0; i < sList.size(); i++){

			System.out.print("S ");
			System.out.print(sList.get(i));
			System.out.println("");
		}

		//???????????????
		for(int i = 0; i < hList.size(); i++){

			System.out.print("H ");
			System.out.print(hList.get(i));
			System.out.println("");
		}

		//???????????????
		for(int i = 0; i < cList.size(); i++){

			System.out.print("C ");
			System.out.print(cList.get(i));
			System.out.println("");
		}

		//???????????????
		for(int i = 0; i < dList.size(); i++){

			System.out.print("D ");
			System.out.print(dList.get(i));
			System.out.println("");
		}

	}
} Main public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????

		//Scanner????????????????????????
		Scanner scan = new Scanner(System.in);
		//?????°???????????????
		int n = scan.nextInt();

		ArrayList<Integer> sList = new ArrayList<Integer>();
		ArrayList<Integer> hList = new ArrayList<Integer>();
		ArrayList<Integer> cList = new ArrayList<Integer>();
		ArrayList<Integer> dList = new ArrayList<Integer>();
		int intCardVal = 13;
		int[] sAry = new int[intCardVal];
		int[] hAry = new int[intCardVal];
		int[] cAry = new int[intCardVal];
		int[] dAry = new int[intCardVal];
		for(int i = 0; i < intCardVal; i++){
			sAry[i] = 0;
			hAry[i] = 0;
			cAry[i] = 0;
			dAry[i] = 0;
		}

		int intCount = 0;

		while(scan.hasNextLine()){

			String strMark = scan.next();
			int intNum = scan.nextInt();

			if("S".equals(strMark)){

				sAry[intNum - 1] = intNum;

			}else if("H".equals(strMark)){

				hAry[intNum - 1] = intNum;
			}else if("C".equals(strMark)){

				cAry[intNum - 1] = intNum;
			}else if("D".equals(strMark)){

				dAry[intNum - 1] = intNum;
			}

			intCount++;
			if(intCount == n){
				scan.close();
				break;

			}
		}


		//????????????????????£???????????°?????????????????°??????list???????´?
		for(int i = 0; i < intCardVal; i++ ){

			if(sAry[i] == 0 ){

				sList.add( i + 1);
			}
			if(hAry[i] == 0){

				hList.add(i + 1);
			}
			if(cAry[i] == 0){

				cList.add(i + 1);
			}
			if(dAry[i] == 0){

				dList.add(i + 1);
			}
		}


		//??????????????????
		for(int i = 0; i < sList.size(); i++){

			System.out.print("S ");
			System.out.print(sList.get(i));
			System.out.println("");
		}

		//???????????????
		for(int i = 0; i < hList.size(); i++){

			System.out.print("H ");
			System.out.print(hList.get(i));
			System.out.println("");
		}

		//???????????????
		for(int i = 0; i < cList.size(); i++){

			System.out.print("C ");
			System.out.print(cList.get(i));
			System.out.println("");
		}

		//???????????????
		for(int i = 0; i < dList.size(); i++){

			System.out.print("D ");
			System.out.print(dList.get(i));
			System.out.println("");
		}

	} main {
		// TODO ?????????????????????????????????????????????

		//Scanner????????????????????????
		Scanner scan = new Scanner(System.in);
		//?????°???????????????
		int n = scan.nextInt();

		ArrayList<Integer> sList = new ArrayList<Integer>();
		ArrayList<Integer> hList = new ArrayList<Integer>();
		ArrayList<Integer> cList = new ArrayList<Integer>();
		ArrayList<Integer> dList = new ArrayList<Integer>();
		int intCardVal = 13;
		int[] sAry = new int[intCardVal];
		int[] hAry = new int[intCardVal];
		int[] cAry = new int[intCardVal];
		int[] dAry = new int[intCardVal];
		for(int i = 0; i < intCardVal; i++){
			sAry[i] = 0;
			hAry[i] = 0;
			cAry[i] = 0;
			dAry[i] = 0;
		}

		int intCount = 0;

		while(scan.hasNextLine()){

			String strMark = scan.next();
			int intNum = scan.nextInt();

			if("S".equals(strMark)){

				sAry[intNum - 1] = intNum;

			}else if("H".equals(strMark)){

				hAry[intNum - 1] = intNum;
			}else if("C".equals(strMark)){

				cAry[intNum - 1] = intNum;
			}else if("D".equals(strMark)){

				dAry[intNum - 1] = intNum;
			}

			intCount++;
			if(intCount == n){
				scan.close();
				break;

			}
		}


		//????????????????????£???????????°?????????????????°??????list???????´?
		for(int i = 0; i < intCardVal; i++ ){

			if(sAry[i] == 0 ){

				sList.add( i + 1);
			}
			if(hAry[i] == 0){

				hList.add(i + 1);
			}
			if(cAry[i] == 0){

				cList.add(i + 1);
			}
			if(dAry[i] == 0){

				dList.add(i + 1);
			}
		}


		//??????????????????
		for(int i = 0; i < sList.size(); i++){

			System.out.print("S ");
			System.out.print(sList.get(i));
			System.out.println("");
		}

		//???????????????
		for(int i = 0; i < hList.size(); i++){

			System.out.print("H ");
			System.out.print(hList.get(i));
			System.out.println("");
		}

		//???????????????
		for(int i = 0; i < cList.size(); i++){

			System.out.print("C ");
			System.out.print(cList.get(i));
			System.out.println("");
		}

		//???????????????
		for(int i = 0; i < dList.size(); i++){

			System.out.print("D ");
			System.out.print(dList.get(i));
			System.out.println("");
		}

	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan ArrayList<Integer> sList = new ArrayList<Integer>(); sList new ArrayList<Integer>() ArrayList<Integer> hList = new ArrayList<Integer>(); hList new ArrayList<Integer>() ArrayList<Integer> cList = new ArrayList<Integer>(); cList new ArrayList<Integer>() ArrayList<Integer> dList = new ArrayList<Integer>(); dList new ArrayList<Integer>() int intCardVal = 13; intCardVal 13 int[] sAry = new int[intCardVal]; sAry new int[intCardVal] intCardVal int[] hAry = new int[intCardVal]; hAry new int[intCardVal] intCardVal int[] cAry = new int[intCardVal]; cAry new int[intCardVal] intCardVal int[] dAry = new int[intCardVal]; dAry new int[intCardVal] intCardVal for(int i = 0; i < intCardVal; i++){
			sAry[i] = 0;
			hAry[i] = 0;
			cAry[i] = 0;
			dAry[i] = 0;
		} int i = 0; int i = 0; i 0 i < intCardVal i intCardVal i++ i++ i {
			sAry[i] = 0;
			hAry[i] = 0;
			cAry[i] = 0;
			dAry[i] = 0;
		} {
			sAry[i] = 0;
			hAry[i] = 0;
			cAry[i] = 0;
			dAry[i] = 0;
		} sAry[i] = 0 sAry[i] sAry i 0 hAry[i] = 0 hAry[i] hAry i 0 cAry[i] = 0 cAry[i] cAry i 0 dAry[i] = 0 dAry[i] dAry i 0 int intCount = 0; intCount 0 while(scan.hasNextLine()){

			String strMark = scan.next();
			int intNum = scan.nextInt();

			if("S".equals(strMark)){

				sAry[intNum - 1] = intNum;

			}else if("H".equals(strMark)){

				hAry[intNum - 1] = intNum;
			}else if("C".equals(strMark)){

				cAry[intNum - 1] = intNum;
			}else if("D".equals(strMark)){

				dAry[intNum - 1] = intNum;
			}

			intCount++;
			if(intCount == n){
				scan.close();
				break;

			}
		} scan.hasNextLine() scan.hasNextLine scan {

			String strMark = scan.next();
			int intNum = scan.nextInt();

			if("S".equals(strMark)){

				sAry[intNum - 1] = intNum;

			}else if("H".equals(strMark)){

				hAry[intNum - 1] = intNum;
			}else if("C".equals(strMark)){

				cAry[intNum - 1] = intNum;
			}else if("D".equals(strMark)){

				dAry[intNum - 1] = intNum;
			}

			intCount++;
			if(intCount == n){
				scan.close();
				break;

			}
		} String strMark = scan.next(); strMark scan.next() scan.next scan int intNum = scan.nextInt(); intNum scan.nextInt() scan.nextInt scan if("S".equals(strMark)){

				sAry[intNum - 1] = intNum;

			}else if("H".equals(strMark)){

				hAry[intNum - 1] = intNum;
			}else if("C".equals(strMark)){

				cAry[intNum - 1] = intNum;
			}else if("D".equals(strMark)){

				dAry[intNum - 1] = intNum;
			} "S".equals(strMark) "S".equals "S" strMark {

				sAry[intNum - 1] = intNum;

			} sAry[intNum - 1] = intNum sAry[intNum - 1] sAry intNum - 1 intNum 1 intNum if("H".equals(strMark)){

				hAry[intNum - 1] = intNum;
			}else if("C".equals(strMark)){

				cAry[intNum - 1] = intNum;
			}else if("D".equals(strMark)){

				dAry[intNum - 1] = intNum;
			} "H".equals(strMark) "H".equals "H" strMark {

				hAry[intNum - 1] = intNum;
			} hAry[intNum - 1] = intNum hAry[intNum - 1] hAry intNum - 1 intNum 1 intNum if("C".equals(strMark)){

				cAry[intNum - 1] = intNum;
			}else if("D".equals(strMark)){

				dAry[intNum - 1] = intNum;
			} "C".equals(strMark) "C".equals "C" strMark {

				cAry[intNum - 1] = intNum;
			} cAry[intNum - 1] = intNum cAry[intNum - 1] cAry intNum - 1 intNum 1 intNum if("D".equals(strMark)){

				dAry[intNum - 1] = intNum;
			} "D".equals(strMark) "D".equals "D" strMark {

				dAry[intNum - 1] = intNum;
			} dAry[intNum - 1] = intNum dAry[intNum - 1] dAry intNum - 1 intNum 1 intNum intCount++ intCount if(intCount == n){
				scan.close();
				break;

			} intCount == n intCount n {
				scan.close();
				break;

			} scan.close() scan.close scan break; for(int i = 0; i < intCardVal; i++ ){

			if(sAry[i] == 0 ){

				sList.add( i + 1);
			}
			if(hAry[i] == 0){

				hList.add(i + 1);
			}
			if(cAry[i] == 0){

				cList.add(i + 1);
			}
			if(dAry[i] == 0){

				dList.add(i + 1);
			}
		} int i = 0; int i = 0; i 0 i < intCardVal i intCardVal i++ i++ i {

			if(sAry[i] == 0 ){

				sList.add( i + 1);
			}
			if(hAry[i] == 0){

				hList.add(i + 1);
			}
			if(cAry[i] == 0){

				cList.add(i + 1);
			}
			if(dAry[i] == 0){

				dList.add(i + 1);
			}
		} {

			if(sAry[i] == 0 ){

				sList.add( i + 1);
			}
			if(hAry[i] == 0){

				hList.add(i + 1);
			}
			if(cAry[i] == 0){

				cList.add(i + 1);
			}
			if(dAry[i] == 0){

				dList.add(i + 1);
			}
		} if(sAry[i] == 0 ){

				sList.add( i + 1);
			} sAry[i] == 0 sAry[i] sAry i 0 {

				sList.add( i + 1);
			} sList.add( i + 1) sList.add sList i + 1 i 1 if(hAry[i] == 0){

				hList.add(i + 1);
			} hAry[i] == 0 hAry[i] hAry i 0 {

				hList.add(i + 1);
			} hList.add(i + 1) hList.add hList i + 1 i 1 if(cAry[i] == 0){

				cList.add(i + 1);
			} cAry[i] == 0 cAry[i] cAry i 0 {

				cList.add(i + 1);
			} cList.add(i + 1) cList.add cList i + 1 i 1 if(dAry[i] == 0){

				dList.add(i + 1);
			} dAry[i] == 0 dAry[i] dAry i 0 {

				dList.add(i + 1);
			} dList.add(i + 1) dList.add dList i + 1 i 1 for(int i = 0; i < sList.size(); i++){

			System.out.print("S ");
			System.out.print(sList.get(i));
			System.out.println("");
		} int i = 0; int i = 0; i 0 i < sList.size() i sList.size() sList.size sList i++ i++ i {

			System.out.print("S ");
			System.out.print(sList.get(i));
			System.out.println("");
		} {

			System.out.print("S ");
			System.out.print(sList.get(i));
			System.out.println("");
		} System.out.print("S ") System.out.print System.out System System.out "S " System.out.print(sList.get(i)) System.out.print System.out System System.out sList.get(i) sList.get sList i System.out.println("") System.out.println System.out System System.out "" for(int i = 0; i < hList.size(); i++){

			System.out.print("H ");
			System.out.print(hList.get(i));
			System.out.println("");
		} int i = 0; int i = 0; i 0 i < hList.size() i hList.size() hList.size hList i++ i++ i {

			System.out.print("H ");
			System.out.print(hList.get(i));
			System.out.println("");
		} {

			System.out.print("H ");
			System.out.print(hList.get(i));
			System.out.println("");
		} System.out.print("H ") System.out.print System.out System System.out "H " System.out.print(hList.get(i)) System.out.print System.out System System.out hList.get(i) hList.get hList i System.out.println("") System.out.println System.out System System.out "" for(int i = 0; i < cList.size(); i++){

			System.out.print("C ");
			System.out.print(cList.get(i));
			System.out.println("");
		} int i = 0; int i = 0; i 0 i < cList.size() i cList.size() cList.size cList i++ i++ i {

			System.out.print("C ");
			System.out.print(cList.get(i));
			System.out.println("");
		} {

			System.out.print("C ");
			System.out.print(cList.get(i));
			System.out.println("");
		} System.out.print("C ") System.out.print System.out System System.out "C " System.out.print(cList.get(i)) System.out.print System.out System System.out cList.get(i) cList.get cList i System.out.println("") System.out.println System.out System System.out "" for(int i = 0; i < dList.size(); i++){

			System.out.print("D ");
			System.out.print(dList.get(i));
			System.out.println("");
		} int i = 0; int i = 0; i 0 i < dList.size() i dList.size() dList.size dList i++ i++ i {

			System.out.print("D ");
			System.out.print(dList.get(i));
			System.out.println("");
		} {

			System.out.print("D ");
			System.out.print(dList.get(i));
			System.out.println("");
		} System.out.print("D ") System.out.print System.out System System.out "D " System.out.print(dList.get(i)) System.out.print System.out System System.out dList.get(i) dList.get dList i System.out.println("") System.out.println System.out System System.out "" String[] args args public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????

		//Scanner????????????????????????
		Scanner scan = new Scanner(System.in);
		//?????°???????????????
		int n = scan.nextInt();

		ArrayList<Integer> sList = new ArrayList<Integer>();
		ArrayList<Integer> hList = new ArrayList<Integer>();
		ArrayList<Integer> cList = new ArrayList<Integer>();
		ArrayList<Integer> dList = new ArrayList<Integer>();
		int intCardVal = 13;
		int[] sAry = new int[intCardVal];
		int[] hAry = new int[intCardVal];
		int[] cAry = new int[intCardVal];
		int[] dAry = new int[intCardVal];
		for(int i = 0; i < intCardVal; i++){
			sAry[i] = 0;
			hAry[i] = 0;
			cAry[i] = 0;
			dAry[i] = 0;
		}

		int intCount = 0;

		while(scan.hasNextLine()){

			String strMark = scan.next();
			int intNum = scan.nextInt();

			if("S".equals(strMark)){

				sAry[intNum - 1] = intNum;

			}else if("H".equals(strMark)){

				hAry[intNum - 1] = intNum;
			}else if("C".equals(strMark)){

				cAry[intNum - 1] = intNum;
			}else if("D".equals(strMark)){

				dAry[intNum - 1] = intNum;
			}

			intCount++;
			if(intCount == n){
				scan.close();
				break;

			}
		}


		//????????????????????£???????????°?????????????????°??????list???????´?
		for(int i = 0; i < intCardVal; i++ ){

			if(sAry[i] == 0 ){

				sList.add( i + 1);
			}
			if(hAry[i] == 0){

				hList.add(i + 1);
			}
			if(cAry[i] == 0){

				cList.add(i + 1);
			}
			if(dAry[i] == 0){

				dList.add(i + 1);
			}
		}


		//??????????????????
		for(int i = 0; i < sList.size(); i++){

			System.out.print("S ");
			System.out.print(sList.get(i));
			System.out.println("");
		}

		//???????????????
		for(int i = 0; i < hList.size(); i++){

			System.out.print("H ");
			System.out.print(hList.get(i));
			System.out.println("");
		}

		//???????????????
		for(int i = 0; i < cList.size(); i++){

			System.out.print("C ");
			System.out.print(cList.get(i));
			System.out.println("");
		}

		//???????????????
		for(int i = 0; i < dList.size(); i++){

			System.out.print("D ");
			System.out.print(dList.get(i));
			System.out.println("");
		}

	}
} public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????

		//Scanner????????????????????????
		Scanner scan = new Scanner(System.in);
		//?????°???????????????
		int n = scan.nextInt();

		ArrayList<Integer> sList = new ArrayList<Integer>();
		ArrayList<Integer> hList = new ArrayList<Integer>();
		ArrayList<Integer> cList = new ArrayList<Integer>();
		ArrayList<Integer> dList = new ArrayList<Integer>();
		int intCardVal = 13;
		int[] sAry = new int[intCardVal];
		int[] hAry = new int[intCardVal];
		int[] cAry = new int[intCardVal];
		int[] dAry = new int[intCardVal];
		for(int i = 0; i < intCardVal; i++){
			sAry[i] = 0;
			hAry[i] = 0;
			cAry[i] = 0;
			dAry[i] = 0;
		}

		int intCount = 0;

		while(scan.hasNextLine()){

			String strMark = scan.next();
			int intNum = scan.nextInt();

			if("S".equals(strMark)){

				sAry[intNum - 1] = intNum;

			}else if("H".equals(strMark)){

				hAry[intNum - 1] = intNum;
			}else if("C".equals(strMark)){

				cAry[intNum - 1] = intNum;
			}else if("D".equals(strMark)){

				dAry[intNum - 1] = intNum;
			}

			intCount++;
			if(intCount == n){
				scan.close();
				break;

			}
		}


		//????????????????????£???????????°?????????????????°??????list???????´?
		for(int i = 0; i < intCardVal; i++ ){

			if(sAry[i] == 0 ){

				sList.add( i + 1);
			}
			if(hAry[i] == 0){

				hList.add(i + 1);
			}
			if(cAry[i] == 0){

				cList.add(i + 1);
			}
			if(dAry[i] == 0){

				dList.add(i + 1);
			}
		}


		//??????????????????
		for(int i = 0; i < sList.size(); i++){

			System.out.print("S ");
			System.out.print(sList.get(i));
			System.out.println("");
		}

		//???????????????
		for(int i = 0; i < hList.size(); i++){

			System.out.print("H ");
			System.out.print(hList.get(i));
			System.out.println("");
		}

		//???????????????
		for(int i = 0; i < cList.size(); i++){

			System.out.print("C ");
			System.out.print(cList.get(i));
			System.out.println("");
		}

		//???????????????
		for(int i = 0; i < dList.size(); i++){

			System.out.print("D ");
			System.out.print(dList.get(i));
			System.out.println("");
		}

	}
} Main
import java.util.ArrayList;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????

		//Scanner????????????????????????
		Scanner scan = new Scanner(System.in);
		//?????°???????????????
		int n = scan.nextInt();

		ArrayList<Integer> sList = new ArrayList<Integer>();
		ArrayList<Integer> hList = new ArrayList<Integer>();
		ArrayList<Integer> cList = new ArrayList<Integer>();
		ArrayList<Integer> dList = new ArrayList<Integer>();
		int intCardVal = 13;
		int[] sAry = new int[intCardVal];
		int[] hAry = new int[intCardVal];
		int[] cAry = new int[intCardVal];
		int[] dAry = new int[intCardVal];
		for(int i = 0; i < intCardVal; i++){
			sAry[i] = 0;
			hAry[i] = 0;
			cAry[i] = 0;
			dAry[i] = 0;
		}

		int intCount = 0;

		while(scan.hasNextLine()){

			String strMark = scan.next();
			int intNum = scan.nextInt();

			if("S".equals(strMark)){

				sAry[intNum - 1] = intNum;

			}else if("H".equals(strMark)){

				hAry[intNum - 1] = intNum;
			}else if("C".equals(strMark)){

				cAry[intNum - 1] = intNum;
			}else if("D".equals(strMark)){

				dAry[intNum - 1] = intNum;
			}

			intCount++;
			if(intCount == n){
				scan.close();
				break;

			}
		}


		//????????????????????£???????????°?????????????????°??????list???????´?
		for(int i = 0; i < intCardVal; i++ ){

			if(sAry[i] == 0 ){

				sList.add( i + 1);
			}
			if(hAry[i] == 0){

				hList.add(i + 1);
			}
			if(cAry[i] == 0){

				cList.add(i + 1);
			}
			if(dAry[i] == 0){

				dList.add(i + 1);
			}
		}


		//??????????????????
		for(int i = 0; i < sList.size(); i++){

			System.out.print("S ");
			System.out.print(sList.get(i));
			System.out.println("");
		}

		//???????????????
		for(int i = 0; i < hList.size(); i++){

			System.out.print("H ");
			System.out.print(hList.get(i));
			System.out.println("");
		}

		//???????????????
		for(int i = 0; i < cList.size(); i++){

			System.out.print("C ");
			System.out.print(cList.get(i));
			System.out.println("");
		}

		//???????????????
		for(int i = 0; i < dList.size(); i++){

			System.out.print("D ");
			System.out.print(dList.get(i));
			System.out.println("");
		}

	}
}