let () =
  let n = Scanf.scanf "%d\n" (fun x -> x) in
  let s = Array.make 13 false in
  let h = Array.make 13 false in
  let c = Array.make 13 false in
  let d = Array.make 13 false in

  for i = 1 to n do
    let a, b = Scanf.scanf "%c %d\n" (fun x y -> x, y) in
    match a with
      | 'S' -> s.(b-1) <- true
      | 'H' -> h.(b-1) <- true
      | 'C' -> c.(b-1) <- true
      | 'D' -> d.(b-1) <- true
      | _   -> ()
  done;

  Array.iteri (fun i x -> if not x then Printf.printf "S %d\n" (i+1) else ()) s;
  Array.iteri (fun i x -> if not x then Printf.printf "H %d\n" (i+1) else ()) h;
  Array.iteri (fun i x -> if not x then Printf.printf "C %d\n" (i+1) else ()) c;
  Array.iteri (fun i x -> if not x then Printf.printf "D %d\n" (i+1) else ()) d;