#include<iostream> #include<queue> #include<string> using namespace std; struct mitery{ int index; string s; mitery(int i,string ss):index(i),s(ss){} }; void bfs(string s){ queue<mitery> q; q.push(mitery(0,s)); while(!q.empty()){ mitery t=q....