#include using ull = unsigned long long; using ll = long long; using namespace std; void solve() { ull n, changes; cin >> n >> changes; vector nums; vector subgroup_num(n+1000); vector subgroup_val(n + 1000); vector is_mul(n + 1000); nums.reserve(n); ull sgn = 0; bool was_mul = false; bool was_sub = false; bool even = false; char c = 0; for (ull i = 0; i < n; i++) { ull curr; cin >> curr >> ws; if (i != n - 1){ cin >> c; } nums.emplace_back(curr); if (c == '*' || was_mul) { if (!was_mul){ sgn++; } subgroup_num[i] = sgn; if (!subgroup_val[sgn]){ subgroup_val[sgn] = 1; } subgroup_val[sgn] *= curr; is_mul[i] = true; } else { sgn++; subgroup_num[i] = sgn; subgroup_val[sgn] = curr; is_mul[i] = false; } if (was_sub) { subgroup_val[sgn] *= -1; } if (c == '-') { was_sub = true; } else { was_sub = false; } was_mul = c == '*' ? true : false; } ll sum = 0; for (ull i: subgroup_val) { sum += i; } even = !(sum % 2); cout << (even ? "even" : "odd") << endl; ull idx, val; for (ull i = 0; i < changes; i++) { cin >> idx >> val; --idx; ull sgn = subgroup_num[idx]; if (is_mul[idx]){ bool old_odd = abs(subgroup_val[sgn]) % 2; subgroup_val[sgn] /= nums[idx]; subgroup_val[sgn] *= val; nums[idx] = val; if (old_odd == abs(subgroup_val[sgn]) % 2){ cout << (even ? "even" : "odd") << endl; } else { cout << (even ? "odd" : "even") << endl; even = !even; } } else { bool old_odd = abs(subgroup_val[sgn]) % 2; if (subgroup_val[sgn] < 0){ subgroup_val[sgn] = -val; } else { subgroup_val[sgn] = val; } nums[idx] = val; if (old_odd == val % 2){ cout << (even ? "even" : "odd") << endl; } else { cout << (even ? "odd" : "even") << endl; even = !even; } } } } signed main() { cin.sync_with_stdio(false); cin.tie(0); solve(); return 0; }