#include <bits/stdc++.h>
int main() {
  int n;
  int a[10000];
  while (scanf("%d", &n) != EOF) {
    for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
    for (int i = 1; i <= n; i++) {
      if (a[i] % 2 == 0) a[i] -= 1;
    }
    for (int i = 1; i <= n - 1; i++) printf("%d ", a[i]);
    printf("%d\n", a[n]);
  }
  return 0;
}
