#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const long long oo = 1e15 + 7;
const int maxn = 1e6 + 1;
const int maxN = 1e3 + 1;
int n;
int a[maxn];
void in() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
void solve() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    if (a[i] % 2 == 0) a[i]--;
  }
  for (int i = 1; i <= n; i++) cout << a[i] << " ";
}
int main() {
  in();
  solve();
}
