#include <bits/stdc++.h>
using namespace std;
int main(int argc, char *argv[]) {
  int n;
  cin >> n;
  for (int i = 0; i < n; ++i) {
    if (i) cout << " ";
    int x;
    cin >> x;
    if (x % 2) {
      cout << x;
    } else {
      cout << x - 1;
    }
  }
  cout << endl;
  return 0;
}
