#include <bits/stdc++.h>
using namespace std;
int n, a[10000];
void solve() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    if (a[i] % 2 == 0) a[i]--;
    cout << a[i] << ' ';
  }
}
int main() {
  solve();
  return 0;
}
