#include<iostream>
#include<vector>
#include<string>
using namespace std;
class Person
{
public:
static int num;
string name, password;
bool flag;
};
int Person::num = 0;
vector<Person> P;
void Judge(Person &per);
int main()
{
int n;
cin >> n;
for (int i = 0; i < n; i++)
{
Person per;
cin >> per.name >> per.password;
Judge(per);
P.push_back(per);
}
if (Person::num == 0)
{
if (n > 1)
cout << "There are " << n << " accounts and no account is modified" << endl;
if (n == 1)
cout << "There is 1 account and no account is modified" << endl;
}
else
{
cout << Person::num << endl;
for (auto iter = P.begin(); iter != P.end(); iter++)
{
if(iter->flag)
cout << iter->name << ' ' << iter->password << endl;
}
}
system("pause");
return 0;
}
void Judge(Person &per)
{
int l = per.password.length();
int t = 0;
per.flag = false;
while (t < l)
{
switch (per.password[t])
{
case '1': per.flag = true; per.password[t] = '@'; break;
case '0': per.flag = true; per.password[t] = '%'; break;
case 'l': per.flag = true; per.password[t] = 'L'; break;
case 'O': per.flag = true; per.password[t] = 'o'; break;
}
t++;
}
if (per.flag)
per.num++;
}