#include<iostream>
#include<vector>
#include<cmath>
using namespace std;
vector<int> v1;
vector<int> v2;
int main(){
int n;
cin >> n;
for(int i=0; i<n; i++){
int m;
cin >> m;
v1.push_back(m);
}
int s = 0;
for(int i=0; i<n; i++){
s += v1[i]*pow(2,i);
if(s%5==0){
v2.push_back(1);
}else{
v2.push_back(0);
}
}
for(int i=0; i<n-1; i++){
if(v2[i]==1){
cout << "true ";
}else if(v2[i]==0){
cout << "false ";
}
}
if(v2[n-1]==1){
cout << "true" << endl;
}else if(v2[n-1] == 0){
cout << "false" << endl;
}
return 0;
}