문제
풀이
#include <iostream>
#include <string>
#include <vector>
using namespace std;
bool solve(void) {
int n; cin >> n;
if (n == 0) return false;
vector<string> v(n);
for (int i=0; i<n; i++) cin >> v[i];
for (int i=0; i<n/2; i++) {
cout << v[i] << "\n" << v[n/2+i+n%2] << "\n";
}
if (n & 1) cout << v[n/2] << "\n";
return true;
}
int main(void) {
ios::sync_with_stdio(false);
cin.tie(nullptr);
while (solve());
return 0;
}