#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-8;
int a[1001];
int main() {
  int n, flag;
  cin >> n;
  int maxn = 0;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    maxn = max(a[i], maxn);
  }
  for (int i = 0; i < n; i++) {
    if (a[i] % 2 == 0) a[i]--;
  }
  cout << a[0];
  for (int i = 1; i < n; i++) {
    cout << " " << a[i];
  }
  cout << endl;
  return 0;
}
