program fbishu;
var
a:array[0..10000] of char;
m,n,i,j:longint;
k:char;
procedure houxu(x:longint);
begin
if x<=m*2-1 then
begin
houxu(x*2);
houxu(x*2+1);
write(a[x]);
end;
end;
begin
assign(input,'fbip.in');
assign(output,'fbip.out');
reset(input);
rewrite(output);
readln(n);
m:=1;
for i:=1 to n do
m:=m*2;
for i:=m to m*2-1 do
begin
read(k);
if k='1' then
a[i]:='I'
else
a[i]:='B';
end;
for i:=m-1 downto 1 do
if a[i*2]=a[i*2+1] then
a[i]:=a[i*2]
else
a[i]:='F';
houxu(1);
close(input);
close(output);
end.