Sort Words by Length

Given a sentence whose words are separated by single spaces, sort the words by length in ascending order. When two words have the same length, preserve their original relative order. Return the sorted words joined by single spaces.

Examples
Input: "sort the words by length"
Output: "by the sort words length"
Hints

Sort Words by Length

Given a sentence whose words are separated by single spaces, sort the words by length in ascending order. When two words have the same length, preserve their original relative order. Return the sorted words joined by single spaces.