Var x,temp:string;
first,last:char;
k1,k2:integer;
begin
write ('X = ');
readln (x);
k1:=0;
k2:=0;
first:=x[1];
last:=x[length(x)];
temp:=x;
while (pos(first,temp)>0) do
begin
inc(k1);
delete (temp,pos(first,temp),1);
end;
temp:=x;
while (pos(last,temp)>0) do
begin
inc(k2);
delete (temp,pos(last,temp),1);
end;
if (k1>k2) then writeln ('First') else
if (k2>k1) then writeln ('Last') else
writeln ('Equal');
end.