#include #include using namespace std; int main(int argc, char *argv[]) { while (1) { int N; std::string t; getline(cin, t); stringstream ss(t); ss >> N; if (N==0) break; getline(cin, t); string o; for (int i = 0; i='a') o += 'A'+t[i]-'a'; else o += t[i]; } string o2; if (N < o.length()) { o2.insert(0, o.length(), ' '); int p = 0; for (int i = 0; i < N; ++i) { for (int j = 0; j < o.length() ; j += N) { o2[j+i] = o[p]; ++ p; } } } else o2 = o; //cout << N << " '" << o2 << "'" << endl; cout << o2 << endl; } return 0; }