#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; using namespace atcoder; #define rep(i,n) for (int i=0;i-1;i--) #define pb push_back #define all(x) (x).begin(), (x).end() template using vec = vector; template using vvec = vec>; template using vvvec = vec>; using ll = long long; using pii = pair; using pll = pair; template bool chmin(T &a, T b){ if (a>b){ a = b; return true; } return false; } template bool chmax(T &a, T b){ if (a T sum(vec x){ T res=0; for (auto e:x){ res += e; } return res; } template ostream& operator<<(ostream& os, const vec& A){ os << "["; rep(i,A.size()){ os << A[i]; if (i!=A.size()-1){ os << ' '; } } os<<"]"; return os; } template ostream& operator<<(ostream& os, const set& A){ os << "{"; for (auto e:A){ os << e; auto it = A.find(e); it++; if (it!=A.end()){ os << " "; } } os << "}"; return os; } template ostream& operator<<(ostream& os, const pair& A){ os << "(" << A.first <<", " << A.second << ")"; return os; } template ostream& operator<<(ostream& os, const deque& A){ os << "deque({"; rep(i,A.size()){ os << A[i]; if (i!=A.size()-1){ os << ' '; } } os<<"})"; return os; } using mint = modint998244353; ostream& operator<<(ostream& os, const mint& a){ os << a.val(); return os; } int main(){ ios::sync_with_stdio(false); std::cin.tie(nullptr); int N,K; cin>>N>>K; string S; cin>>S; deque T; rep(i,N-1){ if (S[i]=='1' && S[i+1]=='1'){ T.pb('0'); } else{ T.pb('1'); } } N -= 1; while (N-K>=2){ T.pop_front(); T.pop_back(); N -= 2; } if (N-K==1){ deque U; rep(i,N-1){ if (T[i]=='1' && T[i+1]=='1'){ U.pb('0'); } else{ U.pb('1'); } } swap(T,U); } for (auto a:T){ cout << a ; } cout << endl; }