#include<stdio.h> int main() { int n,i,set=1; char str[16][26]; while(scanf("%d",&n)&&n!=0) { for(i=1;i<=n;i++) { scanf("%s",&str[i]); } printf("SET %d\n",set); set++; if(n%2==0) { for(i=1;i<=n;) { printf("%s\n",str[i]); i=i+2; } for(i=n;i>0;) { printf("%s\n",str[i]); i=i-2; } } else { for(i=1;i<=n;) { printf("%s\n",str[i]); i=i+2; } for(i=n-1;i>0;) { printf("%s\n",str[i]); i=i-2; } } } return 0; }