#include <bits/stdc++.h>
//make_tuple emplace_back next_permutation push_back make_pair second first setprecision


#if MYDEBUG
#include "lib/cp_debug.hpp"
#else
#define DBG(...) ;
#endif

using LL = long long;
constexpr LL LINF=334ll<<53;
constexpr int INF=15<<26;
constexpr LL  MOD=1E9+7;

namespace Problem{
using namespace std;
class Writer{
static ostringstream oss;
public:template<class T> void appendln(const vector<vector<T>> &ans,string spl=" ", string el="\n"){for(int i=0; i<(int)ans.size(); ++i){for(int j=0; j<(int)ans[i].size(); ++j){oss << ans[i][j];oss << (j==(int)ans[i].size()-1?el:spl);}}}
    template<class T> void appendln(const vector<T>& ans, string spl=" "){for(int i=0; i<(int)ans.size(); ++i){oss << ans[i] << (i==(int)ans.size()-1?"\n":spl);}}
    template<class T> void appendln(const T& answer){oss << answer << "\n";}
    template<class T> void append(const T& answer){oss << answer;}
    void appends(const string spl){oss.seekp((int)oss.tellp()-1);oss<<"\n";}
    template<class F, class... R>void appends(const string spl,const F& fi, const R&... rest){oss << fi << spl; appends(spl, rest...);}
    static void write(){cout << oss.str();}
    Writer(){static bool is_single =true;assert(is_single);is_single=false;};
};ostringstream Writer::oss;


class Solver{
public:
    int n;
    vector<vector<int>> t,p;
    Solver(LL n):n(n),t(n),p(n){};

    void solve(){
        if(n==2){
            cout << "1 2" <<"\n";
            return;
        }
        if(n==3){
            cout << "1 2 3" <<"\n";
            return;
        }

        for(int i=0; i<n-1; ++i){
            int a,b;
            cin >>a >> b;
            --a;--b;
            t[a].push_back(b);
            t[b].push_back(a);
        }
        int r;
        int cnt = 0,cnt2=0;
        for(int i=0; i<n; ++i){
            if(t[i].size()>1){
                r= i;
                cnt++;
            }
        }
        queue<int>Q;
        vector<int> visit(n);
        visit[r] = 1;
        Q.push(r);
        cnt2++;
        while(!Q.empty()){
            int nxt = Q.front();
            Q.pop();
            for(auto v : t[nxt]){
                if(!visit[v] and t[v].size()>1){
                    visit[v] = visit[nxt] +1;
                    Q.push(v);
                    cnt2++;
                    p[nxt].push_back(v);
                    p[v].push_back(nxt);
                }
            }
        }
        vector<int> lr;
        for(int i=0; i<n; ++i){
            if(p[i].size()>2){
                cout << -1 <<"\n";
                return;
            }
            if(p[i].size()==1){
                lr.push_back(i);
            }
        }
        if((int)lr.size()==0){
            cout << 1 <<' ';
            for(int i=3; i<n; ++i){
                cout << i <<' ';
            }
            cout << 2<<' '<<n <<"\n";
            return;
        }
        vector<pair<int,int>> sl,sr;
        queue<int>Ql;
        vector<int> visitl(n);
        visitl[lr[0]] = 1;
        Ql.push(lr[0]);
        while(!Ql.empty()){
            int nxt = Ql.front();
            Ql.pop();
            sl.emplace_back(t[nxt].size(),nxt);
            for(auto v : p[nxt]){
                if(!visitl[v]){
                    visitl[v] = visitl[nxt] +1;
                    Ql.push(v);
                }
            }
        }

        queue<int>Qr;
        vector<int> visitr(n);
        visitr[lr[1]] = 1;
        Qr.push(lr[1]);
        while(!Qr.empty()){
            int nxt = Qr.front();
            Qr.pop();
            sr.emplace_back(t[nxt].size(),nxt);
            for(auto v : p[nxt]){
                if(!visitr[v]){
                    visitr[v] = visitr[nxt] +1;
                    Qr.push(v);
                }
            }
        }

        bool l3 = true;
        for(int i=0; i<(int)sl.size(); ++i){
            if(sl[i].first<sr[i].first)break;
            else if(sl[i].first>sr[i].first){
                l3 = false;
                break;
            }
        }
        if(!l3)swap(sr,sl);


        cout << 1<<' ';
            DBG(t)
            DBG(sl)
        for(int i=0, p=1; i<(int)sl.size(); ++i){
            DBG(i,sl[i],p)
            for(int j=p+2; j<=p+sl[i].first-1; ++j){
                cout << j << ' ';
            }
            cout << p+1<<' ';
            p=p + sl[i].first-1;
        }
        cout << n<<' '<<"\n";


    }
};
}

int main(){
    std::cin.tie(0);
    std::ios_base::sync_with_stdio(false);
    long long n=0;
    std::cin >> n;
    Problem::Solver sol(n);
    sol.solve();
    Problem::Writer::write();
    return 0;
}



Measured memory_bytes: 14712