char * reverseOnlyLetters(char * S){
int len = strlen(S);
int left=0,right=len-1;
char ch;
while(left<right)
{
if (isalpha(S[left]) && isalpha(S[right]))
{
ch = S[left];
S[left++] = S[right];
S[right--] = ch;
}
while(left<right && !isalpha(S[left])) left++;
while(left<right && !isalpha(S[right])) right--;
}
return S;
}