#include <bits/stdc++.h>
using namespace std;
int n;
long long ar;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0), cout.tie(0);
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> ar;
    (ar % 2 == 0) ? cout << ar - 1 << " " : cout << ar << " ";
  }
  return 0;
}
