#B2120. Word Length Calculation

    ID: 11202 Type: Default 1000ms 256MiB

Word Length Calculation

Word Length Calculation

Given a single line containing a sequence of words separated by one or more spaces, compute the length of each word.

Note: Punctuation marks (such as hyphens, commas, etc.) attached to a word are considered part of that word. Any contiguous sequence of non-space characters is regarded as a word.

inputFormat

The input consists of a single line with a sequence of words separated by one or more spaces.

outputFormat

Output the lengths of the words in the same order as they appear in the input, separated by a single space.

sample

Hello world
5 5