I want to create list like attached pic

I try this command
\begin{enumerate}
\item xxx
\begin{enumerate}
\item A
\item B
\end{enumerate}
\begin{enumerate}
\item yy
\end{enumerate}
\end{enumerate}
But output is different. How to fix that?
I want to create list like attached pic

I try this command
\begin{enumerate}
\item xxx
\begin{enumerate}
\item A
\item B
\end{enumerate}
\begin{enumerate}
\item yy
\end{enumerate}
\end{enumerate}
But output is different. How to fix that?
Possible solution:
\documentclass{article}
\usepackage{enumitem}
\begin{document}
\begin{description}[nosep]
\item[xxx] \mbox{}
\begin{enumerate}
\item A
\item B
\item C
\end{enumerate}
\item[yy] \mbox{}
\begin{enumerate}[resume]
\item D
\item E
\end{enumerate}
\item[yy] \mbox{}
\begin{enumerate}[resume]
\item F
\item G
\item H
\item I
\end{enumerate}
\end{description}
\end{document}
But it can also be:
\documentclass{article}
\usepackage{enumitem}
\begin{document}
\noindent%
xxx
\begin{enumerate}
\item A
\item B
\item C
\end{enumerate}
yy
\begin{enumerate}[resume]
\item D
\item E
\end{enumerate}
zz
\begin{enumerate}[resume]
\item F
\item G
\item H
\item I
\end{enumerate}
\end{document}
enumitempackage. Using\item [Xxx]will get you the first level list. For the second level list you can use\begin{enumerate}[label=\arabic*]and for subsequent lists where you want the numbering to continue you need to indicate that the numbering is to continue:\begin{enumerate}[label=\arabic*, resume*]. – Peter Grill Feb 04 '22 at 05:59\documentclassand the appropriate packages so that those trying to help don't have to recreate it. A particular solution is often dependent on the packages that you are using. – Peter Grill Feb 04 '22 at 06:01