import java.io.*; import java.util.Stack; public class Main { public static void main(String[] args) throws IOException{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String str = br.readLine(); str = str.replace("[","("); // 将括号统一为小括号 ...