#include "Anna.h"
#include <bits/stdc++.h>
using namespace std;
namespace {
int variable_example = 0;
}
void Anna(int N, vector<char> s) {
int x=-1,y=-1;
for(int q=0;q<N;q++){
if(s[q]=='X'){
if(x==-1){
x=q; Send(1);
}
else{
Send(0);
}
}
else if(s[q]=='Y'){
if(x==-1 || y!=-1){
Send(0);
}
else{
Send(1),y=q;
}
}
else{
if(x==-1 || y==-1){
Send(0);
}
else{
Send(1); y=-1;
}
}
}
}
#include "Bruno.h"
#include <bits/stdc++.h>
using namespace std;
namespace {
int variable_example = 0;
int FunctionExample(int P) { return 1 - P; }
} // namespace
void Bruno(int N, int L, vector<int> A) {
int x=-1,y=-1;
for(int q=0;q<L;q++){
if(A[q]==0){
Remove(q);
}
else if(x==-1){
x=q;
}
else if(y==-1){
y=q;
}
else{
Remove(y),Remove(q);
y=-1;
}
}
if(x!=-1)Remove(x);
if(y!=-1)Remove(y);
}