#include <bits/stdc++.h>
#define MAXN 1030
#define ll long long
using namespace std;
typedef struct node;
typedef node* tree;
struct node{
char data;
tree lc,rc,fa;
};
tree bt;
char a[MAXN];
int n,m,x = 1,aa[MAXN];
inline void build(tree now){
while(n--){
build(now->lc);
build(now->rc);
}
if((!now->lc)&&(!now->rc)){
now->data = a[x++];
}else{
tree l = now->lc;tree r = now->rc;
if(r->data == l->data){
now->data = 'F';
}else{
now->data = r->data;
}
}
}
inline void postorder(tree k){
if(k){
postorder(k->lc);
postorder(k->rc);
cout<<k->data;
}
}
int main(){
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
cin>>n;
m = 1<<n;
for(register int i = 1;i <= m;i++){
int k;
scanf("%1d",&aa[i]);
}
for(register int i = 1;i <= m;i++){
if(aa[i] == 1){
a[i] = 'I';
}else{
a[i] = 'B';
}
}
build(bt);
postorder(bt);
return 0;
}