Order two Strings

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<ts<t evaluates to True if ss is lexicographically smaller than tt.

Input

The input has several cases, each consisting of a pair of strings ss and tt.

Output

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

Problem information

Author: AP1

Generation: 2026-01-25T17:26:59.900Z

© Jutge.org, 2006–2026.
https://jutge.org