#include #include #include #include #include using namespace std; bool print_path(int [][26], int start, int dest, string &path, bool visited[]); string reverse(string in); int main(){ int tc; cin>>tc; while(tc--){ int r, q, c1, c2; char city1[100], city2[100]; int map[26][26] = {0}; cin>>r>>q; while(r--){ cin>>city1>>city2; c1 = (int)city1[0] % 65; c2 = (int)city2[0] % 65; map[c1][c2] = 1; map[c2][c1] = 1; } while(q--){ string path=""; bool viz[26]={false}; cin>>city1>>city2; c1 = (int)city1[0] % 65; c2 = (int)city2[0] % 65; print_path(map, c1, c2, path, viz); cout<0) cout<