#include<stdio.h>
int main()
{
int n, i, sum = 0;
int z;
char dui[17] = { '1','0','X','9','8','7','6','5','4','3','2' };
//因为x并非是一个数字,所以就不能用整形数组,就应该用一个字符数组
int qz[17] = { 7,9,10,5,8,4,2,1,6,3,7,9,10,5,8,4,2 };
scanf("%d", &n);
int count = 1;
char id[100][19];
for (i = 0; i < n; i++)
{
scanf("%s", id[i]);
}
for (i = 0; i < n; i++)
{
int count = 1;
sum=0;
z=0;
for (int k = 0; k < 18; k++)
{
sum += (id[i][k] - '0') * qz[k];
//(id[i][k] - '0')计算每个字符的大小为int型
}
z = sum % 11;
if (dui[z] != id[i][17])
{
printf("%s", id[i]);
printf("\n");
count = 0;
}
}
if (count)
{
printf("All passed");
}
return 0;
}