#include <bits/stdc++.h>
using namespace std;
int fx[4] = {1, -1, 0, 0};
int fy[4] = {0, 0, 1, -1};
const double PI = acos(-1.0);
const double EPS = 1e-6;
const int MOD = (int)1e9 + 7;
const int maxn = (int)3e5 + 5;
const long long inf = 5e18 + 100;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  int n;
  cin >> n;
  vector<long long> v(n);
  for (int i = 0; i < (n); i++) {
    cin >> v[i];
  }
  for (int i = 0; i < (n); i++) {
    if (v[i] % 2 == 1) {
      v[i]++;
    }
  }
  for (int i = 0; i < (n); i++) {
    if (v[i] % 2 == 0) {
      v[i]--;
    }
  }
  for (int i = 0; i < (n); i++) cout << v[i] << " ";
  return 0;
}
