The dealer has been sloppy and lost track of what cards his/her deck contains and what cards are missing, can you help him/her?
A complete deck consists of 52 playing cards, namely:
Each color in the deck (hearts, diamonds, spades, clubs) contains:
- The numbers [2 - 10]
- A Jack
- A Queen
- A King
- An Ace
Your program will read the contents of the deck from STDIN until a newline is read. You can assume that the input will be in the form of "nX nX nX nX" etc. where:
- n - any number between [2 - 10] or either 'J', 'Q', 'K' or 'A'. (You can assume upper case only for non-numeric characters)
- X - any of the following : 'H', 'D', 'S', 'C' (You can assume upper case only)
- 'J' = Jacks
- 'Q' = Queen
- 'K' = King
- 'A' = Ace
- 'H' = Hearts
- 'D' = Diamonds
- 'S' = Spades
- 'C' = Clubs
You can assume that there will be no duplicates in the input.
Your program must then print the missing cards in the deck to STDOUT in the same fashion as the input ("nX nX nX") or print 'No missing cards' if all 52 cards are supplied. There is no constraint on the order of the output of the cards.
9H AH 7C 3S 10S KD JS 9C 2H 8H 8C AC AS AD 7D 4D 2C JD 6S
3H 4H 5H 6H 7H 10H JH QH KH 2D 3D 5D 6D 8D 9D 10D QD 2S 4S 5S 7S 8S 9S QS KS 3C 4C 5C 6C 10C JC QC HC