// author:shujakuin 2021-12-06 18:22:56
#include <iostream>
#include <cstring>
#include <vector>
#include <functional>
#include <algorithm>
#include <cstdio>
#include <cmath>
#include <queue>
#include <stack>
#include <cstdlib>
#include <ctime>
#include <string>
#include <map>
#include <iomanip>
#include <set>
#include <deque>
using namespace std;
#define _for(i, a, b) for ( int i = (a); i < (b); ++i)
#define MEMS(seq, val) memset(seq, val, sizeof(seq));
const int INF = 0x3f3f3f3f;
typedef vector<int> Iv;
typedef long long LL;
typedef unsigned long long ULL;
const int max_length = 100005;
char str[max_length],tmp;
int main()
{
ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
#ifdef ONLINEJUDGE
freopen("in.txt","r",stdin);
freopen("out.txt","w",stdout);
#endif
int length = 0;
while((tmp=getchar())!='\n') str[length++]=tmp;
tmp = getchar();
_for(i,0,length) if(str[i]!=tmp) printf("%c",str[i]);
return 0;
}