<p>You are given an array of <code>logs</code>. Each log is a space-delimited string of words, where the first word is the <strong>identifier</strong>.</p>
<p>There are two types of logs:</p>
<ul>
<li><b>Letter-logs</b>: All words (except the identifier) consist of lowercase English letters.</li>
<li><strong>Digit-logs</strong>: All words (except the identifier) consist of digits.</li>
</ul>
<p>Reorder these logs so that:</p>
<ol>
<li>The <strong>letter-logs</strong> come before all <strong>digit-logs</strong>.</li>
<li>The <strong>letter-logs</strong> are sorted lexicographically by their contents. If their contents are the same, then sort them lexicographically by their identifiers.</li>
<li>The <strong>digit-logs</strong> maintain their relative ordering.</li>
</ol>
<p>Return <em>the final order of the logs</em>.</p>
<strong>Input:</strong> logs = ["dig1 8 1 5 1","let1 art can","dig2 3 6","let2 own kit dig","let3 art zero"]
<strong>Output:</strong> ["let1 art can","let3 art zero","let2 own kit dig","dig1 8 1 5 1","dig2 3 6"]
<strong>Explanation:</strong>
The letter-log contents are all different, so their ordering is "art can", "art zero", "own kit dig".
The digit-logs have a relative order of "dig1 8 1 5 1", "dig2 3 6".