import java.util.Scanner;
class Main {
	public static void main(String[] args) {
		Scanner kb = new Scanner( System.in );

		String str = kb.nextLine();
		int n = Integer.parseInt( str );
		
		boolean[] cards= new boolean[53]; 
		for( int i=0; i<n; i++ ) {
			String pattern = kb.next();
			int num = kb.nextInt();
			if( "S".equals(  pattern ) ) {
				cards[ num-1 ]=true;
			} else if( "H".equals(  pattern ) ) {
				cards[ 12+num ]=true;
			} else if( "C".equals(  pattern ) ) {
				cards[ 25+num ]=true;
			} else if( "D".equals(  pattern ) ) {
				cards[ 38+num ]=true;			
			}
		}

		for( int i=0; i<52; i++ ) {
			if( false == cards[ i ] ) {
				int num = i/13;
				if( 0 == num ) {
					num=(i%13)+1;
					System.out.println( "S "+ num);
				} else if( 1 == num ) {
					num=(i%13)+1;
					System.out.println( "H "+num );
				} else if( 2 == num ) {
					num=(i%13)+1;
					System.out.println( "C "+num );
				} else if( 3 == num ) {
					num=(i%13)+1;
					System.out.println( "D "+num );				
				}
			}
		}
	}
}
/tmp/hf-datasets-cache/medium/datasets/42704881117311-config-parquet-and-info-qiankunmu-Project_CodeNet-896c9d36/hub/datasets--qiankunmu--Project_CodeNet_Python800_and_Java250/snapshots/c899fde44a77ba1cc14973ed3de064e4ff3aadc7/Project_CodeNet_Java250.tar.gz