int main()
{
	int i = 0 , n = 0 , num , card[4][13] ;
	char e ;
	cin >> n ;
	for ( i = 0 ; i < n ; i++ )
	{
		cin >> e >> num ;
		if ( e == 'S' ) card[0][num-1] = 1 ;
		if ( e == 'H' ) card[1][num-1] = 1 ;
		if ( e == 'C' ) card[2][num-1] = 1 ;
		if ( e == 'D' ) card[3][num-1] = 1 ;
	}
	for ( i = 1 ; i <= 13 ; i++ )
	{
		if ( card[0][i-1] != 1 ) cout << "S " << i << endl ;
	}
	for ( i = 1 ; i <= 13 ; i++ )
	{
		if ( card[1][i-1] != 1 ) cout << "H " << i << endl ;
	}
	for ( i = 1 ; i <= 13 ; i++ )
	{
		if ( card[2][i-1] != 1 ) cout << "C " << i << endl ;
	}
	for ( i = 1 ; i <= 13 ; i++ )
	{
		if ( card[3][i-1] != 1 ) cout << "D " << i << endl ;
	}
	return 0;
}

