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