#include <bits/stdc++.h>
using namespace std;
int main() {
  int a[1005];
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 0; i < n; i++) {
    if (a[i] % 10 == 1 || a[i] % 10 == 3 || a[i] % 10 == 5 || a[i] % 10 == 7 ||
        a[i] % 10 == 9) {
      cout << a[i] << " ";
    } else {
      cout << a[i] - 1 << " ";
    }
  }
  return 0;
}
