#include using namespace std; using ll = long long; #define rep(i,m,n) for(int i=m; i> S; int n = S.size(); S[n-1] = char('1' - (S[n-1] - '0')); cout << S << endl; return 0; }