On the low budget intergalactic game show "Flag Quiz!", contestants answer questions like "What colors, symbols and shapes appear on the flags of Empire X?". An empire here is any subset of entities that share a planet, or that the Supreme Map Maker grouped together for some other reason. For example, "Empire Earth Meridian 0" is every nation that the zeroth meridian cuts through on Earth, and in that system the zeroth meridian runs through Stockholm. Knowing real geography, politics or culture can get in your way.
Most of the time you can find the answer by looking only at the alternatives. The underpaid question authors build every alternative by making a small number of changes to the correct answer, where one change replaces one part of the answer with something else. Turning "green, blue, stripes" into "green, yellow, stripes" takes one change, and turning it into "life, universe, stripes" takes two. The authors never reorder the parts, so position matters: turning "green, blue, stripes" into "stripes, blue, green" takes two changes even though the two answers list the same things. Comparison is case sensitive, so "green, blue, stripes" and "Green, Blue, Stripes" differ in 3 parts.
The incongruousity of an alternative is the largest number of changes needed to turn it into any one of the other alternatives. Find the alternatives with the smallest incongruousity.
The first line holds the question. The second line holds one integer N (1≤N≤100), the number of alternatives. Each of the next N lines holds one alternative.
An alternative is a list of parts separated by a comma and a space. Every alternative has the same number of parts, and that number is at most 100. A part is a string of letters a-z and A-Z, digits 0-9 and spaces, it has no leading or trailing space, and its length is at most 50 characters.
Print every alternative whose incongruousity is smallest, one per line, in the order they appear in the input. If there is only one alternative, its incongruousity is 0 and it is printed.