#include<string>
#include <iostream>
#include <stack>
using namespace std;
bool solution(string s)
{
bool answer = true;
stack <int> stack;
for(int i=0;i<s.size();i++){
if(s[i]=='(')
stack.push(1);
else{
if(stack.empty())
return false;
stack.pop();
}
}
if(!stack.empty()) answer=false;
return answer;
}