#include <bits/stdc++.h>
using namespace std;
long long r, c, k, l, k1, a[200008], n, t, x, y, z;
vector<int> v;
map<long long, long long> us;
string s1;
int main() {
  cin >> n;
  for (int j = 0; j < n; j++) cin >> a[j];
  for (int i = 0; i < n; i++) {
    if (a[i] % 2 == 0)
      cout << a[i] - 1 << " ";
    else
      cout << a[i] << " ";
  }
}
