#include <bits/stdc++.h>
using namespace std;
signed main() {
  cout << fixed << setprecision(0);
  long long t = 1;
  while (t--) {
    long long n;
    cin >> n;
    long long arr[n];
    for (long long i = 0; i < n; i++) cin >> arr[i];
    for (long long i = 0; i < n; i++) {
      if (arr[i] % 2 == 0) arr[i]--;
      cout << arr[i] << " ";
    }
  }
}
