const int INF = 10000;
int sum [1025], point;
struct node{
int lChild;
int rChild;
char value;
}tree [1025];
void rootBehind (int nod){
if (tree [nod].lChild == INF && tree [nod].rChild == INF)
printf ("%c", tree [nod].value);
else{
rootBehind (tree [nod].lChild);
rootBehind (tree [nod].rChild);
printf ("%c", tree [nod].value);
}
}
void treeBuild (int a, int b, int nod){
if (sum [b] - sum [a - 1] == 0)
tree [nod].value = 'B';
else if (sum [b] - sum [a - 1] == b - a + 1)
tree [nod].value = 'I';
else
tree [nod].value = 'F';
if (b == a){
tree [nod].lChild = INF;
tree [nod].rChild = INF;
}
else{
tree [nod].lChild = ++point;
tree [nod].rChild = ++point;
treeBuild (a, (a + b) / 2, tree [nod].lChild);
treeBuild ((a + b) / 2 + 1, b, tree [nod].rChild);
}
}
int main (){
int n, t = 1;
char* a;
scanf ("%d", &n);
for (int i = 0; i < n; i ++)t *= 2;
sum [0] = 0;
scanf ("%s", a);
for (int i = 1; i <= t; i ++)
sum [i] = sum [i - 1] + a [i - 1] - '0';
point = 1;
treeBuild (1, t, 1);
rootBehind (1);
return 0;
}