#include<bits/stdc++.h>
using namespace std;
int n;
char s[1025];
void tree (int l,int r){
int mid=(l+r)/2;
if(l!=r){
tree(l,mid);
tree(mid+1,r);
}
bool b=0,i=0;
for(int k=l;k<=r;k++){
if(s[k]=='0')b=1;
if(s[k]=='1')i=1;
}
if(b&&i) cout<<"F";
else {
if(b) cout<<"I";
else cout<<"B";
}
}
int main(){
scanf("%d",&n);
scanf("%s",&s+1);
tree(1,pow(2,n));
return 0;
}