#include <bits/stdc++.h>
using namespace std;
int a;
int main() {
  cin >> a;
  while (cin >> a) {
    if (a % 2 == 0)
      cout << a - 1 << " ";
    else
      cout << a << " ";
  }
  cout << endl;
  return 0;
}
