407169: GYM102697 140 Continental Breakfast
Description
You're eating at a continental breakfast in a hotel, and there are two menu options. Each menu option consists of several food items. You want to find how many food items are contained in both menus.
InputThe first line of input consists of a single positive integer $$$n1$$$: the number of food items on the first menu. The second line of input consists of $$$n1$$$ space-separated strings: the food items on the first menu.
The third line of input consists of a single positive integer $$$n2$$$: the number of food items on the second menu. The fourth line of input consists of $$$n2$$$ space-separated strings: the food items on the second menu.
OutputOutput a single positive integer $$$n$$$: the number of food items that are contained on both menus. Then, output $$$n$$$ lines: each food item which is contained on both menus, in alphabetical order.
ExamplesInput3 Pastries Waffles Eggs 4 Waffles FrenchToast Eggs CerealOutput
2 Eggs WafflesInput
3 Eggs Waffles Pastries 2 FrenchToast CerealOutput
0