Order two Strings X95093


Statement
 

pdf   zip

thehtml

Write a program that reads several pairs of strings, and prints each pair in lexicographic order.

Recall that the comparison operator < in Python is defined for strings as the lexicographic order, that is, the expression s<t evaluates to True if s is lexicographically smaller than t.

Input

The input has several cases, each consisting of a pair of strings s and t.

Output

For each case, you have to write a line with s and t in lexicographical order, separated by a whitespace

Public test cases
  • Input

    hello bye
    bye hello
    a a
    aaa aba
    aba aaa
    aaa aab
    aab aaa
    abb ba
    ba abb

    Output

    bye hello
    bye hello
    a a
    aaa aba
    aaa aba
    aaa aab
    aaa aab
    abb ba
    abb ba
    
  • Information
    Author
    AP1
    Language
    English
    Official solutions
    Python
    User solutions
    Python