#include <bits/stdc++.h>
using namespace std;
int a[1005];
int n;
void read(int &p) {
  int f = 1;
  p = 0;
  char s = getchar();
  while (s < '0' || s > '9') {
    if (s == '-') f = -1;
    s = getchar();
  }
  while (s >= '0' && s <= '9') {
    p = p * 10 + s - '0';
    s = getchar();
  }
  p *= f;
}
int main() {
  read(n);
  for (int i = 1; i <= n; i++) {
    read(a[i]);
    if (a[i] % 2 == 0) a[i]--;
    cout << a[i] << " ";
  }
}
