// // File: newmain.cc // Author: cteam057 // // Created on October 22, 2011, 2:00 PM // #include #include // // // int main(int argc, char** argv) { int n; int l; char text[10000]; int mod; while(true) { scanf("%d", &n); if(n==0) break; l=0; while(true) { text[l]=getchar(); if(text[l]==' ') continue; if(text[l]=='\n') break; if(text[l]>96) text[l]-=32; l++; } mod=l/n; if(l%n!=0) mod++; int temp=0; for(int i=1; i<=l; i++) { printf("%c", text[temp]); temp=(temp+mod)%l; } } return (EXIT_SUCCESS); }