[Tex/LaTex] How to center a block of the lines while flushleft/flushright is applied

horizontal alignment

Obviously the following does not do what I have described in the title.

\documentclass{article}

\begin{document}

\begin{flushright}
\begin{center}
\vspace{1cm}
Here is the first line.\\
Second line.
\end{center}
\end{flushright}
\end{document}

In other words, I would like an output like this:

enter image description here

Best Answer

You can use tabular often addresses in frontmatter are set this way.

enter image description here

\documentclass{article}

\begin{document}


\begin{center}
\begin{tabular}{@{}l@{}}
Here is the first line.\\
Second line.
\end{tabular}
\end{center}
\begin{flushright}
\begin{tabular}{@{}c@{}}
Here is the first line.\\
Second line.
\end{tabular}
\end{flushright}
\end{document}