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