func_code_string: #include <bits/stdc++.h>   using namespace std;   long long N, x, y, awal, centre, nb, a;   bool visited[100005];   vector<long long> adj[100005];   vector<int> ans;   void dfs(int x) {     int s = adj[x].size();     visited[x] = 1;     bool cek = 1;     for (int i = 0; i < s; i++) {       nb = adj[x][i];       if (!visited[nb]) {         cek = 0;         dfs(nb);       }     }     if (cek) ans.push_back(x);   }   int main() {     cin >> N;     for (int i = 1; i < N; i++) {       cin >> x >> y;       adj[x].push_back(y);       adj[y].push_back(x);     }     for (int i = 1; i <= N; i++) {       if (adj[i].size() >= 3) {         awal = i;         centre++;       }     }     if (centre > 1)       cout <<  No n ;     else {       if (centre == 0) {         dfs(1);         cout <<  Yes n  << 1 <<   n ;         for (int i = 1; i <= N; i++) {           if (adj[i].size() == 1) {             cout << i;             a++;             if (a == 1) cout <<    ;           }         }         cout <<   n ;       }       if (centre == 1) {         dfs(awal);         cout <<  Yes n  << ans.size() <<   n ;         for (int i = 0; i < ans.size(); i++) {           cout << awal <<     << ans[i] <<   n ;         }       }     }   }   