#C3240. Unique Chapter Titles
Unique Chapter Titles
Unique Chapter Titles
You are given an integer (N) representing the number of chapter titles followed by (N) chapter titles, each on a new line. Your task is to output the unique chapter titles in the order they appear in the input.
In other words, if a chapter title appears more than once, only its first occurrence should be printed. If no chapter titles are provided (i.e. (N=0)), print an empty line.
inputFormat
The input consists of an integer (N) on the first line indicating the number of chapter titles. This is followed by (N) lines, each containing a chapter title (a non-empty string).
outputFormat
Output the unique chapter titles in the order they first appear, separated by a single space. If (N=0), output an empty line.## sample
5
introduction
basics
variables
basics
syntax
introduction basics variables syntax