LearnPy Hub
← File Handling problems
Easy

Only the First Line

Read n and n lines and write them to poem.txt. Then open it and print only the first line using readline() (without the newline).

Input

n, then n lines.

Output

One line.

Sample 1

Input
2
Roses are red
Violets are blue
Output
Roses are red

Sample 2

Input
1
Only
Output
Only
solution.py
Output appears here
Only the First Line · Python practice problem · LearnPy Hub