Penmanship The cows are learning to write longhoof. Because their hooves are so large, they use incredibly large pens. These pens weigh quite a lot, and so the cows typically don't lift their pens between words like people do. As a result the letters in the words all run together, with no spaces. Farmer Christine wants to read what her cows have written. Given something a cow wrote (at most 80 characters long) and a dictionary of at most 1000 cow words, determine where to insert spaces in the cow's writing so that each word in the sentence is in the dictionary. If there are multiple ways to insert spaces, print "ambiguous" on a single line. There will always be at least one way to break the message into words. PROBLEM NAME: pen INPUT FORMAT: * Line 1: What the cow wrote (up to 80 upper-case letters, with no spaces). * Line 2: A single integer N, the number of words in the cow dictionary. * Lines 3..N+2: N lines, each with a single word in the cow dictionary. Words contain only upper-case letters and are at most 10 letters long. SAMPLE INPUT: THESEPENSSUREAREHEAVY 14 ARE BARN FARMER HEAVY IS JOHN LIGHT MILK MOO PENS SURE THESE UNDER USACO INPUT DETAILS: The cow wrote "THESEPENSSUREAREHEAVY". Farmer John has 14 words in his cow dictionary. OUTPUT FORMAT: * Line 1: The cow's message, with spaces inserted so that each word is from the dictionary, or the string "ambiguous". SAMPLE OUTPUT: THESE PENS SURE ARE HEAVY