Unique Words

Lab Python Beginner 10 points

Read a line of words and print how many different words it has (case-insensitive), then the unique words sorted alphabetically.

Input

One line.

Output

Two lines.

Example

Input

the cat The dog CAT

Output

3
cat dog the
Sample input available Sample output available
Editor
Python

Hints

A set keeps only one copy of each value.

Sets are unordered - sort before printing.

Solution explanation

Sets have no order, so always sorted() them when the output must be predictable.

Show solution
words = {w.lower() for w in input().split()}
print(len(words))
print(*sorted(words))
Output
Answer
HOME LEARN COMMUNITY DASHBOARD