Alphabetical Order for Students
The UptoSkills Arena is organizing a coding competition! To help students find their way, they want to arrange the participant list alphabetically. However, they use a special local alphabet order: 'a' < 'b' < 'c' < ... < 'z'. This seems straightforward, but they only gave us the students' roll numbers which are strings. Help the organizers sort the roll numbers according to this standard English alphabetical order.
Input
The first line contains an integer N, the number of students. The next N lines each contain a string representing a student's roll number. Roll numbers consist of lowercase English letters only.
Output
Print the N roll numbers, each on a new line, sorted in standard alphabetical (lexicographical) order.
Constraints
1 <= N <= 1000. Each roll number string has length between 1 and 100.
Example 1
4 apple banana cherry apricot
apple apricot banana cherry
Roll numbers are sorted alphabetically: apple, apricot, banana, cherry.
Example 2
3 zebra yak xylophone
xylophone yak zebra
Sorted alphabetically: xylophone, yak, zebra.
Hints
# Read the input from stdin and print the answer.
import sys
def main():
data = sys.stdin.read().split()
# your code here
main()
4 apple banana cherry apricot
3 zebra yak xylophone