#include <bits/stdc++.h>
using namespace std;
using vi = vector<int>;
using ll = long long;
using ull = unsigned long long;
using pii = pair<int, int>;
using vll = vector<ll>;
using pll = pair<ll, ll>;
using vvi = vector<vi>;
constexpr int mod = 1000000007;
constexpr int inf = 0x3f3f3f3f;
inline ll powmod(ll a, ll b) {
  ll res = 1;
  a %= mod;
  assert(b >= 0);
  for (; b; b >>= 1) {
    if (b & 1) res = (res * a) % mod;
    a = (a * a) % mod;
  }
  return res;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int t;
  cin >> t;
  vector<int> v(t);
  for (int& x : v) cin >> x;
  for (int& x : v) {
    if (x & 1)
      cout << x << " ";
    else
      cout << x - 1 << " ";
  }
  cout << endl;
}
