// Arup Guha
// 2/28/2016
// Solution to 1996 UCF HS Problem: Miss You

import java.util.*;

public class cards {

	// Useful for this problem.
	final public static String KINDS = "23456789TJQKA";
	final public static String SUITS = "SHDC";
	final public static String[] SUIT_STRINGS = {"Spades", "Hearts", "Diamonds", "Clubs"};

	public static void main(String[] args) {

		// These look up tables are very helpful.
		HashMap<Character,Integer> kindMap = new HashMap<Character,Integer>();
		HashMap<Character,Integer> suitMap = new HashMap<Character,Integer>();
		fillMap(KINDS, kindMap);
		fillMap(SUITS, suitMap);

		Scanner stdin = new Scanner(System.in);
		int loop = 1;

		// Go through all data sets.
		while (stdin.hasNext()) {

			// Set up array to keep track of cards see.
			boolean[][] used = new boolean[SUITS.length()][KINDS.length()];
			String card = stdin.next();

			// Go through the deck.
			while (!card.equals("**")) {
				int kind = kindMap.get(card.charAt(0));
				int suit = suitMap.get(card.charAt(1));
				used[suit][kind] = true;
				card = stdin.next();
			}

			// Print header.
			System.out.println("Data set "+loop+":");

			// Go through each suit.
			for (int i=0; i<SUITS.length(); i++) {

				// Suit header.
				System.out.print("   "+SUIT_STRINGS[i]+":");

				// Print each missing card in this suit.
				for (int j=0; j<KINDS.length(); j++)
					if (!used[i][j])
						System.out.print(" "+KINDS.charAt(j));
				System.out.println();
			}

			// Go to the next case.
			loop++;
			System.out.println();
		}
	}

	// Fills a backwards look up table of the characters in str to their indexex in map.
	public static void fillMap(String str, HashMap<Character,Integer> map) {
		for (int i=0; i<str.length(); i++)
			map.put(str.charAt(i), i);
	}
}