#include #include #define MAX_STRING_LENGTH 100001 char inp_string[MAX_STRING_LENGTH]; int is_palindrome(int left, int right) { /* TODO return 0 if string is not palindrome return 1 if string is palindrome */ return 0; } int is_qualindrome() { /* TODO return 0 if string is not qualindrome return 1 if string is qualindrome HINT : Using is_palindrome() function is helpful */ return 0; } int solver() { scanf("%s",inp_string); if(is_palindrome(0,strlen(inp_string)-1)) return 1; if(is_qualindrome()) return 2; return 3; } int main() { int N; scanf("%d",&N); while(N--) { int ret=solver(); printf("%d\n",ret); } }