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