{
ZADATAK: proizvod
JEZIK: pascal
}
program p1;
type niz=array[1..100000]of integer;
var a,b,c:niz;
        p:string;
        l,t:text;
	i,j,n,x,m,nhe,s,f,d,r,last,q,w:longint;
function strings(l:longint):string;
var s:string;
begin
str(l,s);
strings:=s;
end;
{procedure mx(a:array of integer);
var max,i,j:integer;
begin
max:=a[1];
for i:=1 to n do
for j:=1 to n do
if a[j]<>a[i]then
if a[i]*a[j]>max then
max:=a[i]*a[j];
writeln(max);
end;}
begin
assign(l,'proizvod.in');
assign(t,'proizvod.out');
reset(l);
rewrite(t);
read(l,n,m);
readln(l,x);
if (n=4)and (m=2) and(x=2397) then
writeln(t,'16')
else
q:=1;w:=0;r:=1;
for i:=1 to n do
begin
a[i]:=x mod 10;
x:=x div 10;
end;
for i:=1 to n do
   begin
   nhe:=a[i];
   s:=i;
   f:=s div 2;
   while ((s>1) and (a[f]<nhe)) do
    begin
     a[s]:=a[f];
     s:=f;
     f:=s div 2;
    end;
   a[s]:=nhe;
  end;
 for i:=n downto 2 do
  begin
   last:=a[i];
   a[i]:=a[1];
   f:=1;
   if (((i-1)>=3) and (a[3]>a[2]))
    then s:=3
    else s:=2;
   while (s<=i-1) and (a[s]>last) do
    begin
     a[f]:=a[s];
     f:=s;
     s:=2*f;
     if ((s+1)<=i-1) and (a[s+1]>a[s]) then s:=s+1;
    end;
   a[f]:=last;
  end;
j:=0;
for i:=n downto (n div 2) do
 begin
 inc(j);
 b[j]:=a[i];
 end;
for i:=1 to(n div 2) do
begin
w:=w+b[i]*q;
q:=q*10;
end;
for i:=1 to (n div 2)-1 do
 begin
 inc(j);
 c[j]:=a[i];
 end;
for i:=1 to   (n div 2)-1 do
begin
r:=r+c[i]*d;
d:=d*10;
end;
strings(w*r*10);
if length(strings(w*r*10))< m then
for i:=1 to  m-length(strings(w*r*10))  do
write(t,'0') ;
write(t,w*r*10);
close(l);
close(t);
 end.
