{"raw_statement":[{"iden":"statement","content":"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.\n\nThe first line of input consists of a single positive integer $n 1$: the number of food items on the first menu. The second line of input consists of $n 1$ space-separated strings: the food items on the first menu.\n\nThe third line of input consists of a single positive integer $n 2$: the number of food items on the second menu. The fourth line of input consists of $n 2$ space-separated strings: the food items on the second menu.\n\nOutput 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*.\n\n"},{"iden":"input","content":"The first line of input consists of a single positive integer $n 1$: the number of food items on the first menu. The second line of input consists of $n 1$ space-separated strings: the food items on the first menu.The third line of input consists of a single positive integer $n 2$: the number of food items on the second menu. The fourth line of input consists of $n 2$ space-separated strings: the food items on the second menu."},{"iden":"output","content":"Output 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*."},{"iden":"examples","content":"Input3\nPastries Waffles Eggs\n4\nWaffles FrenchToast Eggs Cereal\nOutput2\nEggs\nWaffles\nInput3\nEggs Waffles Pastries\n2\nFrenchToast Cereal\nOutput0\n"}],"translated_statement":null,"sample_group":[],"show_order":[],"formal_statement":"**Definitions**  \nLet $ M_1 = \\{s_{1,1}, s_{1,2}, \\dots, s_{1,n_1}\\} $ be the set of food items on the first menu.  \nLet $ M_2 = \\{s_{2,1}, s_{2,2}, \\dots, s_{2,n_2}\\} $ be the set of food items on the second menu.  \n\n**Constraints**  \n1. $ n_1, n_2 \\in \\mathbb{Z}^+ $  \n2. All $ s_{1,i}, s_{2,j} $ are strings.  \n\n**Objective**  \nCompute the intersection $ M = M_1 \\cap M_2 $.  \nOutput:  \n- $ |M| $, the cardinality of $ M $,  \n- followed by the elements of $ M $ sorted in alphabetical order.","simple_statement":"Find the common food items between two menus.  \nFirst, read the number of items and the list for menu 1.  \nThen, read the number of items and the list for menu 2.  \nOutput the count of common items, followed by the common items in alphabetical order.","has_page_source":false}