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