const rl = require("readline").createInterface({ input: process.stdin });

var iter = rl[Symbol.asyncIterator]();

const readline = async () => (await iter.next()).value;

void async function () {

    // Write your code here

    

    while(line = await readline()){

        const arr = [];

        const count = parseInt(line);

        for (let i = 0i < counti++) {

            arr.push(await readline())

        }

        arr.sort();

        arr.forEach((cell=> {

            console.log(cell);

        })

    }

}()const rl = require("readline").createInterface({ input: process.stdin });

var iter = rl[Symbol.asyncIterator]();

const readline = async () => (await iter.next()).value;

void async function () {

    // Write your code here

    

    while(line = await readline()){

        const arr = [];

        const count = parseInt(line);

        for (let i = 0i < counti++) {

            arr.push(await readline())

        }

        arr.sort();

        arr.forEach((cell=> {

            console.log(cell);

        })

    }

}()