#include #include #include using namespace std; int main(void) { char str[10010]; char str2[10010];// string str2; int step, fullLenght=0; int delka; int g; int i = 0; do { scanf("%d\n", &step); if(step==0) break; i = 0; g = getchar(); while (g != '\n') { if(g == ' ') { g = getchar(); continue; } if(g>= 'a' && g<= 'z') { g-=32; } str[i++] = g; g = getchar(); } fullLenght = delka = i; int indexAkt=0; // int nazacatku=0; // while(true){ // int i=nazacatku++; // for (i; i < fullLenght; i+=(step)) { // str2[i]=str[indexAkt++]; // } // // // } int i, j; for (i = 0; i < step; i++) { j = i; for (j; j < fullLenght; j+=(step)) { //if (j+step < fullLenght) { str2[j] = str[indexAkt++]; //} } } /*if (delka <= step) { for(i=0; i