#include <iostream> using namespace std; const int N = 30; int son[N]; int find(int a, int b) { int cnt = 0; while(a != son[a] && a != b) { a = son[a]; cnt ++; } if(a == b) return cnt; return 0; } int main() { string s3 = "great-", s2 = "grand", s11 = "parent", s12 = "child", s1; int n, m; whi...