LearnPy Hub
← Tuples & Sets problems
Hard

Words Only Here, Only There, Both

Read two sentences (lowercase). Print three lines: words only in the first, words only in the second, words in both — each sorted, or - when empty.

Input

Two lines.

Output

Three lines.

Sample 1

Input
i like tea
you like coffee
Output
i tea
coffee you
like

Sample 2

Input
a b
a b
Output
-
-
a b
solution.py
Output appears here
Words Only Here, Only There, Both · Python practice problem · LearnPy Hub