#include using namespace std; int main(){ int N, K; cin >> N >> K; vector> op; for (int i = 0; i < N; i++){ for (int j = N - 2; j >= i; j--){ int a = j, b = j + 1; op.push_back(make_tuple("XOR", N, a, b)); op.push_back(make_tuple("AND", b, a, b)); op.push_back(make_tuple("XOR", a, b, N)); } } int cnt = op.size(); cout << cnt << endl; for (int i = 0; i < cnt; i++){ if (get<0>(op[i]) == "AND"){ cout << "AND " << get<1>(op[i]) << ' ' << get<2>(op[i]) << ' ' << get<3>(op[i]) << endl; } if (get<0>(op[i]) == "XOR"){ cout << "XOR " << get<1>(op[i]) << ' ' << get<2>(op[i]) << ' ' << get<3>(op[i]) << endl; } } }