using namespace std; #include "iostream" #include "vector" struct Cell { int evenCount = 0; }; int main() { int n, m; cin >> n >> m; int num; char op; bool total = false; vector numbers; vector cells; vector ids; for (int i = 0; i < n; ++i) { if(i == 0) { cin >> num; numbers.push_back(num); cells.push_back(Cell()); if(num%2 == 0) { cells.back().evenCount += 1; } ids.push_back(cells.size()-1); continue; } cin >> op; cin >> num; numbers.push_back(num); if(op == '*') { if(num%2 == 0) { cells.back().evenCount += 1; } } else { if(cells.back().evenCount > 0) { total = !total; } cells.push_back(Cell()); if(num%2 == 0) { cells.back().evenCount += 1; } } ids.push_back(cells.size()-1); } if(total) cout << "odd" << endl; else cout << "even" << endl; int numPos; int newNum; for (int i = 0; i < m; ++i) { cin >> numPos; cin >> newNum; int cellId = ids[numPos - 1]; Cell& cell = cells[cellId]; bool first = false; bool second = false; if(numbers[numPos-1] % 2 == 0) { cell.evenCount -= 1; first = true; } if(newNum % 2 == 0) { cell.evenCount += 1; second = true; } if(cell.evenCount == 0 && first && !second) total = !total; if(cell.evenCount == 1 && second && !first) total = !total; numbers[numPos-1] = newNum; if(total) cout << "odd" << endl; else cout << "even" << endl; } return 0; }