#include <bits/stdc++.h>
const int inf = 1000000007;
const long long INF = 3e18;
const double pi = 2 * acos(0.0);
using namespace std;
int gcd(int a, int b) {
  a = abs(a);
  b = abs(b);
  while (b) {
    a = a % b;
    swap(a, b);
  }
  return a;
}
int main() {
  int n;
  cin >> n;
  long long arr[n];
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
  }
  for (int i = 0; i < n; i++) {
    if (arr[i] % 2 == 0) {
      arr[i]--;
    }
  }
  for (long long i : arr) {
    cout << i << " ";
  }
}
