#include #include #include using namespace std; int main() { // t : # of test cases int t; cin>>t; while(t--) { // s : #input string string s; cin>>s; char open[]={'[','{','('}; char close[]={']','}',')'}; vector stack; int i=0; int n=s.length(); int printed=0; while(i