#include <iostream> #include <string> #include <vector> //#include <math.h> #include<algorithm> using namespace std; int main() { string s,t; getline(cin, s, '\n'); getline(cin, t, '\n'); int lens = s.size(); vector<int> res; int lent = t.size(); int l = 0,c=0; while (l<=lens-lent) { if (s.substr(l, lent) == t) { for (int i = 0; i < lent-1; i++) res.push_back(c); c++; res.push_back(c); l += lent; } else{ res.push_back(c); l++; } } for (int j = lens - lent+1; j < lens; j++) res.push_back(c); for (int k = 0; k < lens; k++) cout << res[k]; //system("pause"); return 0; }