// Author: Ovidiu Predescu
//
// This program is in public domain

#include <string.h>
#include <unistd.h>

int main(int argc, char** argv) 
{
  int bufsize = 4096;
  char inbuf[bufsize];
  int len, size;

  while ((len = size = read(0, inbuf, bufsize)) > 0) {
    len -= ((len % 2) == 1);
    swab(inbuf, inbuf, len);
    write(1, inbuf, size);
  }
}
