int interactiveCompare(const void *x1, const void *x2)
{
  const char *s1 = *(const char * const *)x1;
  const char *s2 = *(const char * const *)x2;
  static int count = 0;
  printf(, ++count, s1, s2);
  int response;
  scanf(, &response);
  return response;
}

void printOrder(const char *items[], int len)
{
  printf();
  for (int i = 0; i < len; ++i) printf(, items[i]);
  printf();
}

int main(void)
{
  const char *items[] =
    {
      , , , , , , 
    };

  qsort(items, sizeof(items)/sizeof(*items), sizeof(*items), interactiveCompare);
  printOrder(items, sizeof(items)/sizeof(*items));
  return 0;
}