题目描述
"I heard that you're settled down
That you found a girl and you're married now.
I heard that your dreams came true.
Guess she gave you things I didn't give to you."
Adele just got news about her old lover. She is in her study, reminiscing all the memories they shared and feeling lonely.
After some initial sobbing, she decided to send him a secret message. But she has a peculiar habit of enclosing all the messages in a series of parenthesis.
Now, Adele's husband gets hold of this message and finds out about the affair. He also knows that, only the message enclosed in the highest number of parenthesis is intended for her lover, all other parts are just a build-up because Adele likes Rolling in the Deep!.
He knows that Adele loves uniformity and thus the message will be balanced.Also She has written just one intended message for her lover. He needs your help to find out the message Adele is sending to her lover.
Input
A single line containing a string S, denoting the message Adele is sending to her lover.
Output
A single line containing the intended message.
Subtask #1 (40 points)
1 ≤ |S| ≤ 100
Subtask #2 (60 points)
1 ≤ |S| ≤ 100000
Sample
Input:
((Never mind(I'll find(someone like you))))
Output:
someone like you
Explanation
The message "someone like you" is enclosed inside 4 braces, which is the highest, and thus is the intended message Adele wants to send.
输入格式
见题面
输出格式
见题面