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