while(line = readline()) {
    var lineCount = parseInt(line)
    var strArr = []
    while(lineCount--) {
        strArr.push(readline().trim())
    }
    strArr.sort()
    strArr.forEach(str => console.log(str))
}