#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    int tmp;
    cin >> tmp;
    if (tmp % 2)
      cout << tmp << "   ";
    else
      cout << tmp - 1 << "   ";
  }
  cin.get();
  cin.get();
}
