func_code_string: #include <bits/stdc++.h>   using namespace std;   long long n, i, p[202020], ki[202020], ka[202020], ta, tb, taa, tbb, nx[202020];   void gab(long long aa, long long bb) {     nx[ka[aa]] = ki[bb];     ka[aa] = ka[bb];     ki[bb] = ki[aa];     p[aa] = bb;   }   long long car(long long aa) {     if (p[aa] == aa)       return aa;     else       return p[aa] = car(p[aa]);   }   int main() {     ios_base::sync_with_stdio(false);     cin.tie(NULL);     cout.tie(NULL);     cin >> n;     for (i = 1; i <= n; i++) p[i] = i;     for (i = 1; i <= n; i++) ki[i] = i;     for (i = 1; i <= n; i++) ka[i] = i;     for (i = 1; i < n; i++) {       cin >> ta >> tb;       taa = car(ta);       tbb = car(tb);       gab(taa, tbb);     }     long long tem = ki[car(1)];     for (i = 1; i <= n; i++) {       cout << tem;       tem = nx[tem];       if (i < n)         cout <<    ;       else         cout <<   n ;     }   }   