#include "bits/stdc++.h"
using namespace std;
#define int long long
#define double long double
#define INF 1000000000000000000
#define MOD 1000000007
int32_t main() {
    ios_base::sync_with_stdio(0);
    cin.tie(0); cout.tie(0);
    int n, ans = 0;
    string s;
    cin >> n >> s;
    bool f = true;
    for(int i = 0; i < n; i++) {
        ans ^= (s[i]-'0');
        if(s[i] != s[0]) f = false;
    }
    if(ans || f) {
        cout << "NE\n";
        return 0;
    }
    cout << "DA\n";
    for(int i = 0; i < n-3; i++) {
        cout << 1 << " " << i+3 << " " << i%3+1 << '\n';
    }
}
| # | Verdict | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict | Execution time | Memory | Grader output | 
|---|
| Fetching results... |