#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define N 3
int main(void) {
char buffer[2048];
scanf("%2047[^\n]%*[^\n]", buffer
); char* delim = ", ";
char* token
= strtok(buffer
, delim
); char* row[N * 2] = {NULL};
row[0] = row[N] = token;
for (int i = 1; i < N; i++) {
if (token == NULL) {
goto END;
}
row[i] = row[N + i] = token;
}
for (int i = 0; i < N; i++) {
printf("%s %s %s\n", row
[i
], row
[1 + i
], row
[2 + i
]); }
END:
return EXIT_SUCCESS;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdGRsaWIuaD4KI2luY2x1ZGUgPHN0cmluZy5oPgoKI2RlZmluZSBOIDMKCmludCBtYWluKHZvaWQpIHsKICBjaGFyIGJ1ZmZlclsyMDQ4XTsKICBwdXRzKCJhLCBiLCBj44Gu5YWl5YqbIDogIik7CiAgc2NhbmYoIiUyMDQ3W15cbl0lKlteXG5dIiwgYnVmZmVyKTsKICBnZXRjaGFyKCk7CiAgY2hhciogZGVsaW0gPSAiLCAiOwogIGNoYXIqIHRva2VuID0gc3RydG9rKGJ1ZmZlciwgZGVsaW0pOwogIGNoYXIqIHJvd1tOICogMl0gPSB7TlVMTH07CiAgcm93WzBdID0gcm93W05dID0gdG9rZW47CiAgZm9yIChpbnQgaSA9IDE7IGkgPCBOOyBpKyspIHsKICAgIHRva2VuID0gc3RydG9rKE5VTEwsIGRlbGltKTsKICAgIGlmICh0b2tlbiA9PSBOVUxMKSB7CiAgICAgIGdvdG8gRU5EOwogICAgfQogICAgcm93W2ldID0gcm93W04gKyBpXSA9IHRva2VuOwogIH0KICBmb3IgKGludCBpID0gMDsgaSA8IE47IGkrKykgewogICAgcHJpbnRmKCIlcyAlcyAlc1xuIiwgcm93W2ldLCByb3dbMSArIGldLCByb3dbMiArIGldKTsKICB9CiBFTkQ6CiAgcmV0dXJuIEVYSVRfU1VDQ0VTUzsKfQo=