For this Question: Given a valid parenthesis string S. A valid parentheses string is either empty "", "(" + A + ")", or A + B, where A and B are valid parentheses strings. Decompose the strings S such that S = P1 + P2 +. . + Pk and there does not exist a way to split any of P1, P2,. . Pk into P = A + B, where A and B are nonempty valid parentheses strings.

Print the concatenation of P1, P2,. , Pk after removing the outermost parentheses from each of them.First line contains the string S.

Constraints:
1 <= |S| <= 10^5Print the concatenation of P1, P2,....Pk after removing the outermost parentheses from each of them.Sample Input 1:
(()())(())

Sample Output 1:
()()()

Explanation: 
(()())(()) = (()()) + (())
Concatenating after removing outer parentheses of each part
()() + () = ()()()

Sample Input 2:
(())

Sample Output 2:
()

Explanation: 
After removing outer parentheses of (()), we get (), I have written this Solution Code: import java.io.*;
import java.util.*;
class Main
{
    public static void main (String args[]) throws IOException{   
        BufferedReader br = new BufferedReader (new InputStreamReader(System.in));
		String s = br.readLine();
		Stack<Character> st = new Stack<Character>();
		int l=0;
		for (int i = 0; i < s.length(); i++) {
			if (s.charAt(i) == ')')st.pop();
			else st.push('(');
			if (st.size() ==0){
			    for(int j=l+1;j<i;j++){
			        System.out.print(s.charAt(j));
			    }
			    l=i+1;
			}
		}
		
    }
}

, In this Programming Language: Java, Now tell me if this Code is compilable or not?