#include <bits/stdc++.h>
using namespace std;
const long long inf = (1LL << 60) - 1;
int dx[] = {-1, 1, 0, 0};
int dy[] = {0, 0, -1, 1};
void solve() {
  long long n;
  cin >> n;
  vector<long long> ans(n);
  for (long long i = 0; i < n; i++) cin >> ans[i];
  for (long long i = 0; i < n; i++) {
    if (ans[i] % 2 == 0) ans[i] -= 1;
  }
  for (long long i = 0; i < n; i++) cout << ans[i] << " ";
}
int main() {
  ios::sync_with_stdio(0);
  cout.tie(0);
  ;
  solve();
  return 0;
}
