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