// Add or remove includes
#include <iostream>
#include <string>

using namespace std;

// Adapt the header of the function to your case
bool wellBracketed(string s);

// Adapt the call to 'function_name' and the way it is called to your case.
int main()  {
   	string s;
    while (cin >> s)
        cout << wellBracketed(s) << endl;
}
