#include <stdio.h>
#include <stdlib.h>

int main()
{
  int r;

  r = fwrite("abcdefg\n", 8, 1, stdout);
  printf("%d\n", r);

  r = fwrite("ABCDEFG\n", 1, 8, stdout);
  printf("%d\n", r);

  r = fwrite("abcdefg\n", 2, 4, stdout);
  printf("%d\n", r);

  r = fwrite("ABCDEFG\n", 4, 2, stdout);
  printf("%d\n", r);

  return 0;
}
