#define rep(i,n) for(int i=0;i<(int)(n);i++) #define ALL(v) v.begin(),v.end() typedef long long ll; #include using namespace std; int main(){ int n,k; cin>>n>>k; k--; string s; cin>>s; vector A(10001); stack sta; rep(i,n){ if(s[i]=='(') sta.push(i); else{ int a=sta.top(); sta.pop(); A[i]=a, A[a]=i; } } cout<