Common letters
Task
The program reads two words (each on its own line, lower-case letters without accents only). It prints the letters found in both words - each once, sorted alphabetically and joined into one string. If the words share no letter, it prints -.
For the words programovanie and matematika the program prints aeim.
Examples
Input
programovanie matematika
Expected output
aeim
After you submit, 5 hidden tests will also check your solution: two other words, nothing in common, repeated letters, the same word twice, one word inside the other.
Python starts the first time you run code.
Ctrl+Enter runs the program. Tab indents. Press Esc, then Tab, to leave the editor.
Input (stdin)
Each line = one call to input().
Output
Hints
Try it yourself first. Each hint reveals a little more - and lowers the reward a little.
Signed out, hints are free - but no XP is awarded either.
Solution
The solution unlocks after the last hint.