let () = 
    let (s, h, c, d) = (0, 1, 2, 3)
    let arr = Array.make_matrix 4 13 false in
    let n = read_int () in
    for _ = 1 to n do 
        let (a, j) = Scanf.scanf "%c %d\n" (fun x y -> (x, y - 1)) in
	match a with
            | 'S' -> arr(s).(j) <- true
            | 'H' -> arr(h).(j) <- true
            | 'C' -> arr(c).(j) <- true
            | 'D' -> arr(d).(j) <- true
            | _   -> ()
    done;
    let f c = 
        Array.iteri (fun i v -> if not v then Printf.printf "%c %d\n" c (i + 1) ); in
    f 'S' arr(s);
    f 'H' arr(h);
    f 'C' arr(c);
    f 'D' arr(d);
;;
