#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
void solve() {
  long long int N;
  cin >> N;
  long long int x;
  for (long long int i = 0; i < N; ++i) {
    cin >> x;
    if (x & 1)
      cout << x << ' ';
    else
      cout << x - 1 << ' ';
  }
}
int main(void) {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int T = 1;
  while (T--) {
    solve();
  }
  exit(0);
}
