Star Unpacking

Lab Python Intermediate 20 points

Read a line of words. Print the first word, the last word, and the number of words in between — using first, *middle, last = ....

Input

One line with at least 2 words.

Output

Three lines.

Example

Input

a b c d e

Output

a
e
3
Sample input available Sample output available
Editor
Python

Hints

A starred name collects all the leftover items into a list.

Solution explanation

Extended unpacking with * works with any iterable.

Show solution
first, *middle, last = input().split()
print(first)
print(last)
print(len(middle))
Output
Answer
HOME LEARN COMMUNITY DASHBOARD