Sorting by word length

C# Easy sorting

Task «Sorting by word length»

Write a program that reads a string containing several words separated by spaces. The program should sort the words in ascending order of their length. If two words have the same length, preserve their original order (stable sort). Output the sorted words separated by spaces.

Input Format

One line containing from 1 to 100 words. Each word consists only of lowercase Latin letters, the length of each word is from 1 to 50 characters.

Output Format

A string containing the same words, sorted by increasing length, separated by a single space.

Examples

Example 1

INPUT
5 1 2 3 4 5
OUTPUT
5

Example 2

INPUT
3 7 9 11
OUTPUT
3
main.cs