#include<stdio.h>
#include<string.h>
#include<stdlib.h>
main()
{
char s[1024][1024], s1[1024];
int n = 6;
int i , j;
int count = 0;
for(i = 0; i < n; i++)
{
gets(s[i]);
}
for(i = 0; i < strlen(s[0]); i++)
{
for(j = 1; j < n; j++)
{
if(s[j][i] != s[0][i])
{
goto to;
}
}
count++;
}
to: for(i = 0; i < count; i++)
{
printf("%c", s[0][i]);
}
return 0;
}
#include<string.h>
#include<stdlib.h>
main()
{
char s[1024][1024], s1[1024];
int n = 6;
int i , j;
int count = 0;
for(i = 0; i < n; i++)
{
gets(s[i]);
}
for(i = 0; i < strlen(s[0]); i++)
{
for(j = 1; j < n; j++)
{
if(s[j][i] != s[0][i])
{
goto to;
}
}
count++;
}
to: for(i = 0; i < count; i++)
{
printf("%c", s[0][i]);
}
return 0;
}