func_code_string: #include <bits/stdc++.h>   int q[1000001] = {0}, p[1000001] = {0};   int main() {     int n, i, a, b, j;     scanf( %d , &n);     for (i = 0; i < n; i++) {       scanf( %d%d , &a, &b);       q[a] = b;       ++p[a];       --p[b];     }     i = 0;     while (p[++i] != 1)       ;     j = q[0];     while (j && i) {       printf( %d %d  , i, j);       i = q[i];       j = q[j];     }     if (i) printf( %d , i);     return 0;   }   