#define _CRT_SECURE_NO_WARNINGS #include #include #include #include #include using namespace std; int main() { int T; cin >> T; for (int _cv = 0; _cv < T; ++_cv) { char str[120], o1[100], o2[100]; scanf("%s", str); int len = strlen(str) / 2, i1 = 0, i2 = len; if (!len) printf("\n\n"); else { char *c = str; o2[i2] = 0; while (*c) { o1[i1++] = *c; c++; o2[--i2] = *c; c++; } o1[i1] = 0; printf("%s\n%s\n", o1, o2); } } #ifndef ONLINE_JUDGE system("pause"); #endif return 0; }