bool find(string s)
{
int n=s.size();
for(int i=0;i<n/2;i++)
if(s[i]!=s[n-i-1])
return 0;
return 1;
}
string firstPalindrome(vector<string>& words) {
for(auto str: words)
if(find(str))
return str;
return "";
}
bool find(string s)
{
int i=0,j=s.size()-1;
while(j>i)
{
if(s[i++]!=s[j--])
return 0;
}
return 1;
}
string firstPalindrome(vector<string>& words) {
for(auto str: words)
if(find(str))
return str;
return "";
}