#include <stdio.h>
#define LENGTH 80
int main(void)
{
int c, i, j;
char s[LENGTH-1];
i = 0;
while ((c = getchar()) != EOF)
{
if (c != '\n')
{
if (i == LENGTH-1)
for (j = 0; j < LENGTH-1; j++)
putchar(s[j]);
if (i >= LENGTH-1)
putchar(c);
else
s[i] = c;
i++;
}
else
{
if (i > LENGTH-1)
putchar('\n');
i = 0;
}
}
return 0;
}