#include <cstdio>

int main( int argc, char **argv )
{
  if (argc > 1)
    freopen(argv[1], "r", stdin);
  if (argc > 2)
    freopen(argv[2], "w", stdout);
  int c;
  while ((c = getc(stdin)) != -1)
    putc(c, stdout);
  fclose(stdout);
  return 0;
}
