#K81267. Unique Phrases
Unique Phrases
Unique Phrases
You are given two phrases, each consisting of a series of words separated by spaces. Your task is to extract the words that appear exclusively in one of the two phrases, preserving the order of their appearance. Specifically, let \(S_1\) and \(S_2\) be the set of words from the first and second phrase respectively. You should output the words in \(S_1 \setminus S_2\) in the order they appear in the first phrase, followed by the words in \(S_2 \setminus S_1\) in the order they appear in the second phrase. If there are no such unique words, print peace
.
inputFormat
The input consists of two lines. The first line contains the first phrase and the second line contains the second phrase.
outputFormat
Output a single line with the unique words separated by a single space in the order they appear, or print peace
if no unique word exists.## sample
battle honor respect
honor courage wisdom
battle respect courage wisdom