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