#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<string.h>
#define SIZE 40
char* s_gets(char*, int);
int main(void)
{
char st[SIZE];
int n = 0;
while (n < 3) {
puts(s_gets(st, 10));
n++;
}
return 0;
}
char* s_gets(char* st, int n)
{
char c;
int i=0;
while (scanf("%c", &c) == 1 && c != '\n' && i < n-1)
{
st[i] = c;
i++;
}
st[i] = '\0';
if (i == n - 1)
while (getchar() != '\n')
continue;
return st;
}