Removing Brackets 2#4443

Removing Brackets 2

1 second
64 megabytes
Very easy

Given a string consisting of round, square, and curly brackets, output the longest valid bracket sequence that can be obtained by removing some characters from the given string. If there are multiple valid sequences of maximum length, you may output any one of them.

Input

The input consists of a string containing round, square, and curly brackets. The string's length will not exceed characters.

Output

Output the longest valid bracket sequence that can be obtained by removing some characters from the given string. If there are multiple possible answers, output any of them.

Examples

Example 1

Loading
Loading