#include <iostream>
#include <cstdio>
#include <cstring>
using namespace std;
int main(int argc, char** argv) {
char str[81];
gets(str);
int len=strlen(str);
int numV=(len+2)/3; //statisfy the max;==n1==n3;
int n2=len-2*numV+2;
int posstart=0,posend=len-1;
for(int i=0;i<numV-1;i++){
printf("%c",str[posstart]);
for(int u=0;u<n2-2;u++) putchar(' ');
printf("%c\n",str[posend]);
posstart++;
posend--;
}
for(int it=posstart;it<=posend;it++){
printf("%c",str[it]);
}
return 0;
#include <cstdio>
#include <cstring>
using namespace std;
int main(int argc, char** argv) {
char str[81];
gets(str);
int len=strlen(str);
int numV=(len+2)/3; //statisfy the max;==n1==n3;
int n2=len-2*numV+2;
int posstart=0,posend=len-1;
for(int i=0;i<numV-1;i++){
printf("%c",str[posstart]);
for(int u=0;u<n2-2;u++) putchar(' ');
printf("%c\n",str[posend]);
posstart++;
posend--;
}
for(int it=posstart;it<=posend;it++){
printf("%c",str[it]);
}
return 0;
}