#include #include using namespace std; using namespace atcoder; //loop #define REP(i, n) for (ll i = 0; i < (ll)(n); i++) //vector #define ALL(A) A.begin(), A.end() #define RV(A) reverse(ALL(A)) #define RALL(A) A.rbegin(), A.rend() #define SORT(A) sort(ALL(A)) #define RSORT(A) sort(RALL(A)) template inline void getSum(T& a,vector b) {for(auto v:b) a+=v;} //input template inline void input(T& a) { cin >> a; } template inline void input_li(T& a) {for(auto &ob:a) cin >> ob;} template inline void input(T&... a) { ((cin >> a), ...); } //output #define Yes(bo) cout << ((bo) ? "Yes":"No") << endl #define YES(bo) cout << ((bo) ? "YES":"NO") << endl #define yes(bo) cout << ((bo) ? "yes":"no") << endl #define Taka(bo) cout << ((bo) ? "Takahashi":"Aoki") << endl //other #define pb push_back #define pf push_front #define ppb pop_back #define ppf pop_front #define sz size #define is insert #define ps push #define tp top #define ft front #define pp pop template inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0;} template inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0;} //const #define I_MAX 2147483647 #define I_MIN -2147483647 #define UI_MAX 4294967295 #define LL_MAX 9223372036854775807 #define LL_MIN -9223372036854775808 #define ULL_MAX 18446744073709551615 #define Inf 1LL<<60 //type using ll = long long; using ull = unsigned long long; using ld = long double; using Pair = pair; using vll = vector; using mint = modint998244353; using mint1 = modint1000000007; using Graph_n = vector>; using Graph_w = vector>; using Graph_s = vector>; //this type can erase edges using Graph_e = vector>; using Edges_n = vector>; using Edges_w = vector>; using Stack_l = stack; using Queue_l = queue; using Deque_l = deque; using Prque_g = priority_queue,greater>; using Prque_l = priority_queue; //debug #ifdef _DEBUG #define debug(x) cerr << "dbg_var : " << #x << ": " << x << endl #define debug2(x,y) cerr << "dbg_var : " << #x << ": " << x << " "<< #y << ": " << y << endl #define debug3(x,y,z) cerr << "dbg_var : " << #x << ": " << x << " "<< #y << ": " << y << " " << #z << ": " << z < dxy{{1,0},{-1,0},{0,1},{0,-1}}; //https://algo-logic.info/calc-pow/ ll dpow(ll x, ll n,ll mod) { ll ret = 1; while (n > 0) { if (n & 1) ret = ret * x % mod; x = x * x % mod; n >>= 1; } return ret; } ll chd21(ll N,ll i,ll j){ return N*i+j; } Pair chd12(ll N,ll X){ return {X/N,X%N}; } int main(){ ll N,K;cin >> N >> K; string S;cin >> S; vector ans(N); stack st; for(ll i=0;i