#include <bits/stdc++.h>
using namespace std;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
mt19937 rnl(7319);
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n, x;
  cin >> n;
  for (; n--;) {
    cin >> x;
    cout << x - (x + 1) % 2 << " ";
  }
  return 0;
}
