#K39992. Sort Book Titles

    ID: 26543 Type: Default 1000ms 256MiB

Sort Book Titles

Sort Book Titles

Given a list of book titles, your task is to sort them in lexicographical order (i.e. dictionary order). The comparison is case sensitive and follows the standard ASCII order. For example, "Apple" comes before "apple".

You will read the input from standard input (stdin) and output the sorted titles to standard output (stdout), one title per line.

inputFormat

The first line of input contains an integer n, representing the number of book titles. This is followed by n lines, each containing one book title.

outputFormat

The output should consist of n lines with the book titles sorted in lexicographical order.## sample

3
The Great Gatsby
To Kill a Mockingbird
1984
1984

The Great Gatsby To Kill a Mockingbird

</p>