#include <bits/stdc++.h>
using namespace std;
void debugv(std::vector<long long> v);
void printv(std::vector<long long> v);
void inputv(std::vector<long long> &v);
void solve() {
  long long n;
  cin >> n;
  std::vector<long long> v;
  for (long long i = 0; i < n; i++) {
    long long k;
    cin >> k;
    if (k % 2 == 0) {
      v.push_back(k - 1);
    } else {
      v.push_back(k);
    }
  }
  for (auto i : v) {
    cout << i << " ";
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long t;
  t = 1;
  while (t--) {
    solve();
    cout << "\n";
  }
  return 0;
}
void debugv(std::vector<long long> v) {
  long long size = v.size();
  for (long long i = 0; i < size; i++) {
    cerr << v[i] << " ";
  }
  cout << '\n';
}
void printv(std::vector<long long> v) {
  long long size = v.size();
  for (long long i = 0; i < size; i++) {
    cout << v[i] << " ";
  }
  cout << '\n';
}
void inputv(std::vector<long long> &v) {
  for (auto &i : v) {
    cin >> i;
  }
}
