#include <stdio.h>
int main(void)
{
char a[11] = {0};
int i, sum;
while(scanf("%s", a) != EOF)
{
sum = 0;
a[0] = toupper(a[0]);
if(a[0] == 'I') a[0] = 34;
else if(a[0] == 'O') a[0] = 35;
else if(a[0] <= 'H') a[0] = a[0]-'A'+10;
else if(a[0] <= 'N') a[0] = a[0]-'A'+9;
else if(a[0] <= 'Z') a[0] = a[0]-'A'+8;
for(i = 1; i<11; i++) a[i] -= '0';
/*for(i = 0; i<10; i++) printf("%3d", a[i]);*/
sum += a[0]/10 + a[0]%10*9;
for(i = 1; i<9; i++) sum += a[i]*(9-i);
sum += a[9];
if(sum % 10 == 0) printf("real\n");
else printf("fake\n");
for(i = 0; i<10; i++) a[i] = 0;
}
return 0;
}
一直卡在line:9