#include<iostream>
#include<fstream>
#include<string.h>
using namespace std;
ifstream in("input.in");
void citire(char a[300], char &c1, char &c2)
{
in.get(a, 300);
cin>>c1>>c2;
}
void inlocuire(char a[300], char c1, char c2)
{
int i;
for(i=0;a[i];i++)
{
if(a[i]==c1)
a[i]=c2;
else
if(a[i]==c2)
a[i]=c1;
}
}
void afisare(char a[300])
{
cout<<"\nNoul sir:\n";
cout<<a;
}
int main()
{
char a[300], c1, c2;
citire(a, c1 ,c2);
inlocuire(a, c1 ,c2);
afisare(a);
}