#include<bits/stdc++.h>
#define ll long long int
#define ull unsigned long long int
#define pb push_back
#define mp make_pair
#define vi vector<int>
#define vvi vector<vi>
#define Max(a,b) ((a)>(b)?(a):(b))
#define Min(a,b) ((a)<(b)?(a):(b))
#define rep(i,a,b) for(ll i=a;i<b;i++)
#define all(a) a.begin(),a.end()
#define endl '\n'
#define hell 1000000007
using namespace std;
class ParenthesesDiv2Medium {
public :
vector < int > correct( string) ;
} ;
vector < int > ParenthesesDiv2Medium:: correct ( string s) {
vector< int > ans;
int open= 0 ;
int close= 0 ;
int n= s.length ( ) ;
rep( i,0 ,n) {
if ( open== close && s[ i] == ')' ) {
ans.pb ( i) ;
open++ ;
continue ;
}
if ( open== n/ 2 && s[ i] == '(' ) {
ans.pb ( i) ;
continue ;
}
if ( s[ i] == '(' ) open++ ;
else close++ ;
}
return ans;
}
//Powered by [KawigiEdit] 2.0!
I2luY2x1ZGU8Yml0cy9zdGRjKysuaD4KI2RlZmluZSBsbCBsb25nIGxvbmcgaW50CiNkZWZpbmUgdWxsIHVuc2lnbmVkIGxvbmcgbG9uZyBpbnQKI2RlZmluZSBwYiBwdXNoX2JhY2sKI2RlZmluZSBtcCBtYWtlX3BhaXIKI2RlZmluZSB2aSB2ZWN0b3I8aW50PgojZGVmaW5lIHZ2aSB2ZWN0b3I8dmk+CiNkZWZpbmUgTWF4KGEsYikgKChhKT4oYik/KGEpOihiKSkKI2RlZmluZSBNaW4oYSxiKSAoKGEpPChiKT8oYSk6KGIpKQojZGVmaW5lIHJlcChpLGEsYikgZm9yKGxsIGk9YTtpPGI7aSsrKQojZGVmaW5lIGFsbChhKSBhLmJlZ2luKCksYS5lbmQoKQojZGVmaW5lIGVuZGwgJ1xuJwojZGVmaW5lIGhlbGwgMTAwMDAwMDAwNwp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKY2xhc3MgUGFyZW50aGVzZXNEaXYyTWVkaXVtIHsKcHVibGljOgoJdmVjdG9yIDxpbnQ+IGNvcnJlY3Qoc3Ry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