Problem1582--Djw's century puzzle

1582: Djw's century puzzle

[Creator : ]
Time Limit : 1 sec  Memory Limit : 128 MB

Description

Since djw knew I was making Test questions, he came up with this question to make you difficult.If give you A string contains more than one word.Output the specified location in reverse order as required.

Input

A string contains more than one word no more than 100 words

The number of output words n

Word location required output

Output

The result

Sample Input Copy

Happy birthday to you
2
1 3

Sample Output Copy

yppaH ot

Source/Category