SETtextbf{SET}SET is a real-time card game designed by Marsha Falco in 1974 and published by Set Enterprises in 1991. The deck consists of 81 unique cards that vary in four features across three possi
SETtextbf{SET}SET is a real-time card game designed by Marsha Falco in 1974 and published by Set Enterprises in 1991. The deck consists of 81 unique cards that vary in four features across three possibilities for each kind of feature: number of shapes (one, two, or three), shape (diamond, squiggle, or oval), shading (solid, striped, or open), and color (red, green, or purple). Each possible combination of features (e.g. a card with [three][diamond][striped][green]texttt{[three][diamond][striped][green]}[three][diamond][striped][green]) appears as a card precisely once in the deck. In the game, certain combinations of three cards are said to make up a settextbf{set}set. For each one of the four categories of features --- color, number, shape, and shading --- the three cards must display that feature as a) either all the same, or b) all different. Put another way: For each feature the three cards must avoid having two cards showing one version of the feature and the remaining card showing a different version. For example, [three][diamond][solid][red]texttt{[three][diamond][solid][red]}[three][diamond][solid][red] [two][squiggle][solid][green]texttt{[two][squiggle][solid][green]}[two][squiggle][solid][green] [one][oval][solid][purple]texttt{[one][oval][solid][purple]}[one][oval][solid][purple] form a settextbf{set}set, because the shadings of the three cards are all the same, while the numbers, the colors, and the shapes among the three cards are all different. There are some special cards which called Wild cards. Some values of a Wild card's features can be wild, i.e they can take any value the player chooses. For example, [*][diamond][solid][red]texttt{[*][diamond][solid][red]}[*][diamond][solid][red] can be regarded as [one][diamond][solid][red]texttt{[one][diamond][solid][red]}[one][diamond][solid][red], [two][diamond][solid][red]texttt{[two][diamond][solid][red]}[two][diamond][solid][red] or [three][diamond][solid][red]texttt{[three][diamond][solid][red]}[three][diamond][solid][red]. You're given Nmathbf{N}N unique cards, you need to find any valid settextbf{set}set. Each card is used at most once.