program nesusedni;
var a1,a2,i:longint;
c1,c2:char;

begin
  read(c1,c2);
  read(a1,a2);
  if abs(a1-a2)>1 then write('nemoguce')
    else if a1=a2 then for i:=1 to a1 do write(c1,c2)
        else if a1>a2 then begin for i:=1 to a2 do write(c1,c2);write(c1);end
            else if a1<a2 then begin for i:=1 to a1 do write(c2,c1);write(c2);end;
  
  
end.