#K39162. Unique Word Finder

    ID: 26360 Type: Default 1000ms 256MiB

Unique Word Finder

Unique Word Finder

Given a list of words, find the first unique word in the list. A word is considered unique if it appears exactly once. If there is no unique word, output an empty string.

Formally, if the input list of words is \( [w_1, w_2, \dots, w_n] \), you need to find the first word \( w_i \) such that the total count of \( w_i \) in the list is 1, i.e. \( \text{count}(w_i)=1 \). If no such word exists, output an empty string.

The input is provided via standard input (STDIN) and the output via standard output (STDOUT).

inputFormat

The input consists of a single line containing words separated by spaces. If the line is empty, it represents an empty list.

Example: apple banana apple orange banana grape

outputFormat

Output a single line containing the first unique word. If there is no unique word, output an empty line.

## sample
apple banana apple orange banana grape
orange