#include <bits/stdc++.h>
using namespace std;
int main() {
  long int n, x, i, j;
  cin >> n;
  vector<long long> a;
  long long temp = 0;
  for (i = 0; i < n; i++) {
    cin >> x;
    a.push_back(x);
  }
  for (i = 0; i < n; i++) {
    if (a[i] % 2 == 0) {
      a[i] = a[i] - 1;
    }
  }
  for (i = 0; i < n; i++) {
    cout << a[i] << " ";
  }
  cout << endl;
  return 0;
}
