#include<bits/stdc++.h> using namespace std; void toLower(string &s) { for (int i = 0; i < s.size(); i++) { s[i] = tolower(s[i]); } return; } bool match(string s, string m) { toLower(s); toLower(m); int front = 0, back = 0; int ps = -1, pm = -1; int len = s.size(); while (ps <...