Three domestic automobiles of brands A, B, and C and three foreign automobiles of brands X, Y, and Z will be displayed in a single row at an exhibition according to the following conditions.
  • Domestic and foreign automobiles will be arranged consecutively within their own groups.
  • Brand A automobile will be in the first or last position among all automobiles.
  • Brand X automobile will be in the first or last position among foreign automobiles.

Given this, in how many different ways can the automobiles be displayed?
A) 10
B) 12
C) 14
D) 16
E) 18
Three domestic automobiles of brands A, B, and C and three foreign automobiles of brands X, Y, and Z will be displayed in a single row at an exhibition according to the following conditions.

\begin{itemize}
  \item Domestic and foreign automobiles will be arranged consecutively within their own groups.
  \item Brand A automobile will be in the first or last position among all automobiles.
  \item Brand X automobile will be in the first or last position among foreign automobiles.
\end{itemize}

Given this, in how many different ways can the automobiles be displayed?\\
A) 10\\
B) 12\\
C) 14\\
D) 16\\
E) 18