#include <stdio.h>
#include <unistd.h>

int main(int argc, char **argv)
{
  FILE *fd;
  char buf[65536];
  char *ptr;
  int k=0, l=0, m=0;

  if (argv[1])
    fd = fopen(argv[1], "r");
  else
    exit(0);

  while(ptr=fgets(buf, 65000, fd)) {
    if (l==1) {
       if (m==1) {
	  printf("\n");
          printf("===============================================================================");
	  printf("\n\n");
          printf("English translation\n\n", buf);
       } else {
	  ptr = buf;
          while(isspace(*ptr)) ++ptr;
          printf("%s\n\n", ptr);
       }
       l = 0;
       ++m;
    }
    if (strstr(buf, "banner.gif]")) ++l;
    if (strstr(buf, "=============")) {
       ++k;
       continue;
    }
    if (k==1 || k==3) {
       ptr = buf;
       while(isspace(*ptr)) ++ptr;
       printf("%s", ptr);
    }
  }
}
