#include <bits/stdc++.h>
using namespace std;
const long long mod = 998244353;
const double PI = acos(-1);
int n, i, j, k, t;
int a[1003];
int main() {
  scanf("%d", &n);
  for (i = 0; i < n; ++i) {
    scanf("%d", a + i);
    if (a[i] % 2 == 0) a[i]--;
  }
  for (i = 0; i < n; ++i) printf("%d ", a[i]);
  puts("");
  return 0;
}
