public static String parseAndRep(String[] args)
   {
     try
     {
       String str = args[0];
       int iter = Integer.parseInt(args[1]);
       if (iter <= 0) throw new NumberFormatException();
       String ret = "";
       for (int i=0;i<iter;i++)
       {
         ret += str;
         if (i < iter-1) ret += " ";
       }
       return ret;
     }
     catch (ArrayIndexOutOfBoundsException e)
     {
       return "Error: insufficient arguments";
     }
     catch (NumberFormatException e)
     {
       return "Error: second argument is not a positive integer";
     }
   }