#include <bits/stdc++.h>
using namespace std;
const int maxn = 2 * 1e4 + 10;
const int mod = 10000;
long long num[maxn];
int main() {
  std::ios::sync_with_stdio(false);
  long long n;
  cin >> n;
  for (long long i = 0; i < n; i++) {
    cin >> num[i];
  }
  for (long long i = 0; i < n - 1; i++) {
    if (num[i] & 1) {
      cout << num[i] << " ";
    } else {
      cout << num[i] - 1 << " ";
    }
  }
  if (num[n - 1] & 1) {
    cout << num[n - 1] << endl;
  } else {
    cout << num[n - 1] - 1 << endl;
  }
  return 0;
}
