http://acm.hit.edu.cn/hoj/problem/view?id=1684
#include <stdio.h>
int main()
{
char str[16][32];
int n, count = 1;
int i, j;
while (scanf("%d", &n) && n)
{
for (i = 1; i <= n; i++)
{
scanf("%s", str[i]);
}
printf("SET %d\n", count);
for (j = 1; j <= n; j += 2)
{
printf("%s\n", str[j]);
}
if (n % 2 == 0)
for (j = n; j >= 1; j -= 2)
{
printf("%s\n", str[j]);
}
else
for(j = n-1; j >= 1; j -= 2)
{
printf("%s\n", str[j]);
}
count++;
}
return 0;
}