func_code_string: #include <bits/stdc++.h>   using namespace std;   int read() {     int x = 0, f = 1;     char ch = getchar();     while (ch <  0  || ch >  9 ) {       if (ch ==  - ) f = -1;       ch = getchar();     }     while (ch >=  0  && ch <=  9 ) {       x = x * 10 + ch -  0 ;       ch = getchar();     }     return x * f;   }   int n, cnt;   int ans[100005];   vector<int> e[100005];   map<int, int> mp[100005];   map<vector<int>, int> H;   set<int> st;   int dp(int x, int fa) {     if (mp[x][fa]) return mp[x][fa];     vector<int> cur;     for (int i = 0; i < e[x].size(); i++)       if (e[x][i] != fa) cur.push_back(dp(e[x][i], x));     sort(cur.begin(), cur.end());     if (!H[cur]) H[cur] = ++cnt;     return mp[x][fa] = H[cur];   }   int main() {     n = read();     for (int i = 1; i < n; i++) {       int u = read(), v = read();       e[u].push_back(v);       e[v].push_back(u);     }     for (int i = 1; i <= n; i++)       if (e[i].size() < 4) st.insert(dp(i, 0));     cout << st.size() << endl;     return 0;   }   