You will be given a grocery list, followed by a sequence of items that have already been purchased. You are going to determine which items remain on the the list and output them so that you know what to buy.
You will be give an integer n that describes how many items are on the original grocery list. Following that, you will be given a list of n grocery list items (strings) that you need to buy. After your grocery list is complete, you will receive a list of items that had already been purchased. For each of these items, if it matches any item on your grocery list, you can mark that item as purchased. You will know that you are at the end of the list of items already purchased when you receive the string "DONE".
At that point, you will output a list of items left to buy (each item on its own line).
Write the body of the program.
Details
Input
The program reads the following:
an integer, n, defining the length of the original grocery list
n strings that make up the grocery list
a list of items that had already been purchased (strings)
the string "DONE", marking the end of all required input
Processing
Determine which items on the grocery list have already been purchased.