#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iomanip>
using namespace std;
#define MAX 1000+10
struct Info
{
char username[15];
char password[15];
int change;
} info[MAX];
int main()
{
//freopen("in.txt", "r", stdin);
//freopen("out.txt", "w", stdout);
int N = 0, cnt = 0;
cin >> N;
for (int i = 0; i < N; i++)
{
cin >> info[i].username >> info[i].password;
info[i].change = 0;
}
for (int i = 0; i < N; i++)
{
int f = 0;
for (int j = 0; j < strlen(info[i].password); j++)
{
if (info[i].password[j] == '1')
{
info[i].password[j] = '@';
f = 1;
}
else if (info[i].password[j] == '0')
{
info[i].password[j] = '%';
f = 1;
}
else if (info[i].password[j] == 'l')
{
info[i].password[j] = 'L';
f = 1;
}
else if (info[i].password[j] == 'O')
{
info[i].password[j] = 'o';
f = 1;
}
}
if (1 == f)
{
info[i].change =1;
cnt++;
}
}
if (0 == cnt && 1 == N)
cout << "There is 1 account and no account is modified";
else if (0 == cnt)
cout << "There are " << N << " accounts and no account is modified";
else
{
cout << cnt << endl;
for (int i = 0; i < N; i++)
{
if (info[i].change == 1)
cout << info[i].username << " " << info[i].password << endl;
}
}
return 0;
}