<p>There are <code>n</code> people that are split into some unknown number of groups. Each person is labeled with a <strong>unique ID</strong> from <code>0</code> to <code>n - 1</code>.</p>
<p>You are given an integer array <code>groupSizes</code>, where <code>groupSizes[i]</code> is the size of the group that person <code>i</code> is in. For example, if <code>groupSizes[1] = 3</code>, then person <code>1</code> must be in a group of size <code>3</code>.</p>
<p>Return <em>a list of groups such that each person <code>i</code> is in a group of size <code>groupSizes[i]</code></em>.</p>
<p>Each person should appear in <strong>exactly one group</strong>, and every person must be in a group. If there are multiple answers, <strong>return any of them</strong>. It is <strong>guaranteed</strong> that there will be <strong>at least one</strong> valid solution for the given input.</p>