#include <bits/stdc++.h>
using namespace std;
long long arr[1010];
int main() {
  long long n;
  cin >> n;
  for (long long i = 1; i <= n; i++) {
    long long m;
    cin >> m;
    if (m % 2 == 0) {
      arr[i] = m - 1;
    } else {
      arr[i] = m;
    }
  }
  for (long long i = 1; i < n; i++) {
    cout << arr[i] << " ";
  }
  cout << arr[n] << endl;
}
