#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <cstdio>
#include <math.h>
#include <string>
using namespace std;
int n;
int temp[1005];
int main() {
scanf("%d", &n);
for (int i = 1;i <= n;++i) {
scanf("%d", &temp[i]);
if (temp[i] % 2 == 0) {
temp[i]--;
}
}
for (int i = 1;i <= n;++i) {
printf("%d ", temp[i]);
}
//system("pause");
return 0;
}