#include <bits/stdc++.h>
using namespace std;
int main() {
  long long t, n, q, v, z, p, x, y;
  t = 1;
  while (t--) {
    cin >> n;
    long long arr[n];
    for (int i = 0; i < n; i++) {
      cin >> z;
      if (!(z & 1))
        cout << z - 1 << " ";
      else
        cout << z << " ";
    }
    cout << endl;
  }
  return 0;
}
