#include #include #include int main(){ char str[10001]; char str2[10001]; int sifra, delka, i; char c, k, s; while(1){ scanf("%d", &sifra); if(sifra == 0){ return 0; } i = 0; while(1){ scanf("%c", &c); if(c == '\n'){ break; } if(c == ' '){ continue; } str[i] = c; i++; } str[i] = '\0'; delka = i; k = 0; s = 0; for(int j = 0; j < delka; j++){ if((s * sifra) + k > delka){ k++; s = 0; } str2[((s * sifra)) + k] = toupper(str[j]); //printf("%c %d\n", toupper(str[j]),((s * sifra)) + k); s++; } str2[delka] = '\0'; printf("%s\n", str2); } return 0; }