Alice's library
67% Success8227 Attempts30 Points2s Time Limit256MB Memory1024 KB Max Code

Alice is rearranging her library. She takes the innermost shelf and reverses the order of books. She breaks the walls of the shelf. In the end, there will be only books and no shelf walls. Print the order of books.

Opening and closing walls of shelves are shown by '/' and '\' respectively whereas books are represented by lower case alphabets.

Input format

The first line contains string \(s\) displaying her library.

Output format

Print only one string displaying Alice's library after rearrangement.

Constraints

\(2 \le |s| \le 10^3\)

Note

The first character of the string is '/' and the last character of the string is '\' indicating outermost walls of the shelf.

Examples
Input
/u/love\i\
Output
iloveu
Explanation

/u/love\i\

Here Katrina breaks the inner most shelf and reverse the order. So the library will be  /uevoli\ . 

Now she breaks the outermost wall and reverses the order. So the library will be iloveu.

Please login to use the editor

You need to be logged in to access the code editor

Loading...

Please wait while we load the editor

Loading Editor...
Results