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