#include <iostream>
#include <fstream>

using namespace std;

int
main(int argc, char ** argv)
{
   for(int i = 1; i < argc; i++) {
      ifstream fin(argv[i], ios::in);
      if(!fin.fail()) {
         char ch = fin.get();
         int count = 1;
         while(!fin.fail()) {
            cout << ch;
            if((count % 512) == 0)
              cout.flush();
            ch = fin.get();
            count++;
         }
         fin.close();
      }
      else {
         cerr << "file not found: " << argv[i] << endl;
      }
   }
   return 0;
}
