#include <bits/stdc++.h>
using namespace std;
int dx[] = {1, -1, 0, 0};
int dy[] = {0, 0, 1, -1};
int main() {
  int x;
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> x;
    if (x % 2 == 0) x--;
    cout << x << ' ';
  }
  cout << endl;
}
