/C06035 - Xâu đối xứng 1
<Problem>
https://code.ptit.edu.vn/student/question/C06035#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <string.h>
int main() {
int t;
scanf("%d", &t);
getchar();
while (t--) {
char s[200];
gets(s);
int l = 0;
int r = strlen(s) - 1;
int cnt = 0;
while (l < r) if (s[l++] != s[r--]) cnt++;
if (cnt == 1 || (cnt == 0 && strlen(s) % 2 == 1)) {
printf("YES");
}
else {
printf("NO");
}
printf("\n");
}
return 0;
}