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