void printi(int val);

union sample {
  char c;
  short s;
  int i;
  long l;
  char end;
};

union sample2 {
  long l;
  int i;
  short s;
  char c;
  char end;
};

union sample3 {
  short s;
  char c;
  long l;
  int i;

  char c2;
  long l2;
  int i2;
  short s2;

  long l3;
  char c3;
  int i3;
  short s3;

  char end;
};

int main()
{
  printi(sizeof(union sample));
  /*
  printi((char *)&((union sample *)0)->end - (char *)0);
   */

  printi(sizeof(union sample2));
  /*
  printi((char *)&((union sample2 *)0)->end - (char *)0);
   */

  printi(sizeof(union sample3));
  /*
  printi((char *)&((union sample2 *)0)->end - (char *)0);
   */

  return 0;
}
