\problemname{Dunglish}

% Picture source: https://pxhere.com/en/photo/985146
\illustration{0.31}{dutchmen}{A group of confused Dutchmen.  Public domain.}%
%
A confused Dutchman trying to speak English could say ``\emph{I am in the war}'', even though there is no hostile activity going on. The confusion\footnote{Pun intended.} here is that the English sentence ``\emph{I am confused}'' is translated in Dutch as ``\emph{Ik ben in de war}'', which is phonetically (``sounding'') quite close to the first sentence. Such confusion leads to much enjoyment, but can complicate matters a bit.

Given a sentence in Dutch and a dictionary containing both correct translations as well as phonetic (incorrect) translations of individual words, find the translation of the sentence and indicate whether it is correct, or in case there is more than one find the total number of correct and incorrect translations. A sentence is correctly translated when each word of the sentence is correctly translated.

\section*{Input}

The input consists of:
\begin{itemize}
\item One line with an integer $n$ ($1 \leq n \leq 20$), the number of words in the Dutch sentence.
\item One line with $n$ words, the Dutch sentence $s$.
\item One line with an integer $m$ ($1 \leq m \leq 10^5$), the number of words in the dictionary.
\item $m$ lines, each with three strings $d$, $e$ and $c$, a Dutch word, the English translation, and ``\texttt{correct}'' if this is the correct translation or ``\texttt{incorrect}'' otherwise.
\end{itemize}

A word consists of between $1$ and $20$ lowercase letters. Each word in $s$ appears at least once as a Dutch word in the dictionary, no word appears more than $8$ times as a Dutch word in the dictionary, and each combination of a Dutch and English word appears at most once.

\section*{Output}

In case there is only a single translation of $s$, output one line with the translation followed by one line with ``\texttt{correct}'' or ``\texttt{incorrect}''. In case there is more than one translation, output one line with the number of possible correct translations followed by ``\texttt{correct}'', and one line with the number of possible incorrect translations followed by ``\texttt{incorrect}''.
