{"trustable":false,"sections":[{"title":"","value":{"format":"HTML","content":"\u003cp\u003e\n\tYou\u0026#39;re typing a long text with a broken keyboard. Well it\u0026#39;s not so badly broken. The only problem with the keyboard is that sometimes the \u0026quot;home\u0026quot; key or the \u0026quot;end\u0026quot; key gets automatically pressed (internally).\u003c/p\u003e\n\u003cp\u003e\n\tYou\u0026#39;re not aware of this issue, since you\u0026#39;re focusing on the text and did not even turn on the monitor! After you finished typing, you can see a text on the screen (if you turn on the monitor).\u003c/p\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cp\u003e\n\tThere are several test cases. Each test case is a single line containing at least one and at most 100,000 letters, underscores and two special characters \u0026#39;[\u0026#39; and \u0026#39;]\u0026#39;. \u0026#39;[\u0026#39; means the \u0026quot;Home\u0026quot; key is pressed internally, and \u0026#39;]\u0026#39; means the \u0026quot;End\u0026quot; key is pressed internally. The input is terminated by end-of-file (\u003cspan data-scayt_word\u003d\"EOF\" data-scaytid\u003d\"1\"\u003eEOF\u003c/span\u003e). The size of input file does not exceed \u003cspan data-scayt_word\u003d\"5MB\" data-scaytid\u003d\"2\"\u003e5MB\u003c/span\u003e.\u003c/p\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cp\u003eFor each case, print the resultant text on the screen.\u003c/p\u003e"}},{"title":"Sample Input","value":{"format":"HTML","content":"\u003cpre\u003e\nThis_is_a_[\u003cspan data-scayt_word\u003d\"Beiju\" data-scaytid\u003d\"6\"\u003eBuggy\u003c/span\u003e]_text\n[[]][][]\u003cspan data-scayt_word\u003d\"Happy_Birthday_to_Tsinghua_University\" data-scaytid\u003d\"7\"\u003eSonargaon_University_Programming_Club\u003c/span\u003e\u003c/pre\u003e"}},{"title":"Sample Output","value":{"format":"HTML","content":"\u003cpre\u003e\n\u003cspan data-scayt_word\u003d\"BuggyThis_is_a__text\" data-scaytid\u003d\"9\"\u003eBuggyThis_is_a__text\u003c/span\u003e\n\u003cspan data-scayt_word\u003d\"Happy_Birthday_to_Tsinghua_University\" data-scaytid\u003d\"8\"\u003eSonargaon_University_Programming_Club\u003c/span\u003e\u003c/pre\u003e"}}]}