#include #define MAXN 1500001 using namespace std; struct node{ int st=0; int children[26]; }; node trie[2][MAXN]; int indd[2]; void add(string s,int ii){ int curr=0; for(int i=0;i>n; for(int i=0;i>a; add(a,0); reverse(a.begin(),a.end()); add(a,1); } vhod>>q; for(int i=0;i>a; string b=a; reverse(a.begin(),a.end()); izhod<