#include <bits/stdc++.h>
using namespace std;
int t;
int main() {
  cin >> t;
  while (t--) {
    long long a;
    cin >> a;
    if (a % 2 == 0)
      cout << a - 1;
    else
      cout << a;
    if (t == 0)
      cout << endl;
    else
      cout << " ";
  }
}
