This page is still under construction.

Parts of this page are still being built. What you see may change.

Line Numbers

Interview

Time limit1sMemory limit128 MB

Summary
Read N lines of text and print each one prefixed with its 1-based line number in the format "number. content".
Level

Easy1 of 10

Topics
Implementation, String
Solved
No attempts yet

Problem

Given several lines of text, write a program that prints each line with its line number added in front.

Input

The first line contains the number of lines NN. Each of the next NN lines contains the contents of one line. Each line has at most 50 characters.

Output

Print each line with its line number added in front. Line numbers start from 1 and use the format number. content — that is, the line number followed by a period, a single space, and then the original contents of the line.

Examples1

  1. Example 1

    Input
    5
    Lionel Cosgrove
    Alice
    Columbus and Tallahassee
    Shaun and Ed
    Fido
    
    Expected output
    1. Lionel Cosgrove
    2. Alice
    3. Columbus and Tallahassee
    4. Shaun and Ed
    5. Fido