#include <iostream>
#include <vector>
#include <string.h>
using namespace std;
struct node
{
char name[20], password[20];
};
int main()
{
int n;
scanf("%d", &n);
int i, j, flag, len, k;
node nod;
vector<node> v;
char a[4] = {'1', '0', 'l', 'O'}, b[4] = {'@', '%', 'L', 'o'};
for(i = 1; i <= n; i++)
{
getchar();
scanf("%s%s", nod.name, nod.password);
flag = 0;
len = strlen(nod.password);
for(j = 0; j < len; j++)
{
for(k = 0; k < 4; k++)
{
if(nod.password[j] == a[k])
{
flag = 1;
nod.password[j] = b[k];
}
}
}
if(flag == 1)
{
v.push_back(nod);
}
}
int size = v.size();
if(size == 0)
{
if(n == 1)
{
printf("There is 1 account and no account is modified\n");
}
else
{
printf("There are %d accounts and no account is modified\n", n);
}
}
else
{
printf("%d\n", size);
for(i = 0; i <= size - 1; i++)
{
printf("%s %s\n", v[i].name, v[i].password);
}
}
system("pause");
return 0;
}