#include <bits/stdc++.h>
using namespace std;
const int N = (int)1e6 + 100;
const int mod = (int)1e9 + 7;
const int inf = INT_MAX;
const long long ll_inf = LLONG_MAX;
const long double PI = acos((long double)-1.0);
const long double eps = 1e-6;
void solve() {
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
  }
  for (int i = 0; i < n; ++i) {
    if (a[i] % 2 == 1) {
      ++a[i];
    }
    if (a[i] % 2 == 0) {
      --a[i];
    }
  }
  for (int i = 0; i < n; ++i) {
    cout << a[i] << ' ';
  }
}
int main() {
  ios_base::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr);
  int T = 1;
  for (; T; --T) solve();
  return 0;
}
