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