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