# Arup Guha
# 7/12/2012
# Reads in fruits and sandwiches from a file and prints out a list
# of combo meals with 1 fruit and 1 sandwich.

def main():

    myFile = open("meals.txt", "r")

    # Initialize our lists.    
    list1 = []
    list2 = []

    # Read in the fruits.
    numList1 = int(myFile.readline())
    for i in range(numList1):
        thisFruit = myFile.readline()
        thisFruit = thisFruit[:len(thisFruit)-1]
        list1.append(thisFruit)

    # Read in the sandwiches
    numList2 = int(myFile.readline())
    for i in range(numList2):
        thisSandwich = myFile.readline()
        thisSandwich = thisSandwich[:len(thisSandwich)-1]
        list2.append(thisSandwich)

    # Not necessary, but makes the print in a reasonable order.
    list1.sort()
    list2.sort()

    # A nested loop gives what we want.
    for i in range(numList1):
        for j in range(numList2):
            print("Your meal:",list1[i],"and",list2[j])
    
main()
