#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("Ofast")
void init() {
  freopen("cf.inp", "r", stdin);
  freopen("cf.out", "w", stdout);
}
const long long N = 1e6 + 5;
long long n, a[N], b, c, d, m, t;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> t;
  for (long long i = 1; i <= t; i++) {
    cin >> a[i];
    if (a[i] % 2 == 0) {
      cout << a[i] - 1 << " ";
    } else {
      cout << a[i] << " ";
    }
  }
}
