#include<iostream>
#include<cstdio>
#include<cstring>
#include<string>
#include<cmath>
#include<cstdlib>
using namespace std;
const int maxn=1010;
struct User{
char id[13];
char pw[13];
}user[maxn];
int main()
{
int N,count=0;
scanf("%d",&N);
char id[13],pw[13];
for(int i=0;i<N;i++){
scanf("%s %s",id,pw);
int len=strlen(pw);
bool flag=false;
for(int j=0;j<len;j++){
if(pw[j]=='1' || pw[j]=='0' || pw[j]=='l' || pw[j]=='O'){
flag=true;
if(pw[j]=='1') pw[j]='@';
else if(pw[j]=='0') pw[j]='%';
else if(pw[j]=='l') pw[j]='L';
else pw[j]='o';
}
}
if(flag){
strcpy(user[count].id,id);
strcpy(user[count++].pw,pw);
}
}
if(!count){
printf("There");
if(N==1) printf(" is 1 account ");
else printf(" are %d accounts ",N);
printf("and no account is modified");
}else{
printf("%d\n",count);
for(int i=0;i<count;i++){
printf("%s %s\n",user[i].id,user[i].pw);
}
}
return 0;
}