#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  long long a[n];
  for (long long i = 0; i <= n - 1; i++) cin >> a[i];
  for (long long i = 0; i <= n - 1; i++)
    if ((a[i] % 2)) a[i] += 1;
  for (long long i = 0; i <= n - 1; i++)
    if (!(a[i] % 2)) a[i] -= 1;
  for (long long i = 0; i <= n - 1; i++) cout << a[i] << " ";
  return 0;
}
