#include <bits/stdc++.h>
using ll = long long;
using ull = unsigned long long;
using namespace std;
inline void up(int& x, int y) {
  x = x + y < 1000000007 ? x + y : x + y - 1000000007;
}
inline char emm(int q, int w) { return q == w ? '\n' : ' '; }
inline int read() {
  int x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
int main() {
  int n, a;
  cin >> n;
  while (n--) {
    a = read();
    if (a % 2 == 0) a--;
    printf("%d ", a);
  }
  return 0;
}
