#include <bits/stdc++.h>
using namespace std;
int a[1000];
int main(int argc, char** argv) {
  int b;
  cin >> b;
  for (int c = 0; c < b; c++) {
    cin >> a[c];
    if (a[c] % 2 == 0) a[c]--;
    cout << a[c] << " ";
  }
  return 0;
}
