LearnPy Hub
← Arena
EasyRating 1000

Shortest Words First

Print the words sorted by length. Words of the same length keep their original order.

Input

One line of words.

Output

One line.

Sample 1

Input
the quick brown fox jumps
Output
the fox quick brown jumps

Sample 2

Input
a bb a bb
Output
a a bb bb
solution.py
Output appears here
Shortest Words First · Python Arena problem · LearnPy Hub