Reformat · Easy

Remove duplicates

A list has repeated items, sometimes in different capitals.

Task

Write a prompt that keeps only the first time each item appears.

Output format

one item per line

  • Items that differ only in capitals are the same.
  • Keep the first version, exactly as written, in the original order.

Your prompt must contain {input}: it is replaced by each test case, just like the hidden tests in a hiring test.

Sample case 1
Input
apple
banana
apple
Output
apple
banana
Sample case 2
Input
Milk
milk
BREAD
Milk
Output
Milk
BREAD

There are 4 test cases in all; the others are like hidden tests: work out what tricky inputs they might use!

Loading the editor…