#include <iostream>
using namespace std;
int main() {
string n[1000];
int i = 0;
while (cin >> n[i]) {
i++;
}
double m = i;
for (int j = 0; j <3; j++) {
for (int k = 0; k <m/3 ; k++) {
cout << n[j+k*3]<<" ";
cout << "\n";