/*

                   _ooOoo_
                  o8888888o
                  88" . "88
                  (| -_- |)
                  O\  =  /O
               ____/`---'\____
             .'  \\|     |//  `.
            /  \\|||  :  |||//  \
           /  _||||| -:- |||||-  \
           |   | \\\  -  /// |   |
           | \_|  ''\---/''  |   |
           \  .-\__  `-`  ___/-. /
         ___`. .'  /--.--\  `. . __
      ."" '<  `.___\_<|>_/___.'  >'"".
     | | :  `- \`.;`\ _ /`;.`/ - ` : | |
     \  \ `-.   \_ __\ /__ _/   .-` /  /
======`-.____`-.___\_____/___.-`____.-'======
                   `=---='
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                    prayer
*/

// g++ -std=c++11 a.cpp
#include<iostream>
#include<vector>
#include<string>
#include<algorithm>	
#include<map>
#include<set>
#include<unordered_map>
#include<utility>
#include<cmath>
#include<random>
#include<cstring>
#include<queue>
#include<stack>
#include<bitset>
#include<cstdio>
#include<sstream>
#include<iomanip>
#include<assert.h>
#include<typeinfo>
#define loop(i,a,b) for(int i=a;i<b;i++) 
#define rep(i,a) loop(i,0,a)
#define FOR(i,a) for(auto i:a)
#define pb push_back
#define all(in) in.begin(),in.end()
#define shosu(x) fixed<<setprecision(x)
#define show1d(v) rep(_,v.size())cout<<" "<<v[_];cout<<endl;
#define show2d(v) rep(__,v.size()){rep(_,v[__].size())cout<<" "<<v[__][_];cout<<endl;}
using namespace std;
//kaewasuretyuui
typedef long long ll;
#define int ll
typedef int Def;
typedef pair<Def,Def> pii;
typedef vector<Def> vi;
typedef vector<vi> vvi;
typedef vector<pii> vp;
typedef vector<vp> vvp;
typedef vector<string> vs;
typedef vector<double> vd;
typedef vector<vd> vvd;
typedef pair<Def,pii> pip;
typedef vector<pip>vip;
// #define mt make_tuple
// typedef tuple<int,int,int> tp;
// typedef vector<tp> vt;
template<typename A,typename B>bool cmin(A &a,const B &b){return a>b?(a=b,true):false;}
template<typename A,typename B>bool cmax(A &a,const B &b){return a<b?(a=b,true):false;}
//template<class C>constexpr int size(const C &c){return (int)c.size();}
//template<class T,size_t N> constexpr int size(const T (&xs)[N])noexcept{return (int)N;}
const double PI=acos(-1);
const double EPS=1e-9;
Def inf = sizeof(Def) == sizeof(long long) ? 2e18 : 1e9+10;
int dx[]={0,1,0,-1};
int dy[]={1,0,-1,0};

int n;
vvi G,co;
vi t;
void dfs(int a,int p){
	t.pb(co[a][1]);
	rep(i,G[a].size())if(G[a][i]-p&&co[G[a][i]][0]+1)
		dfs(G[a][i],a);
}
signed main(){
	cin>>n;
	G=vvi(n);
	rep(i,n-1){
		int a,b;
		cin>>a>>b;
		a--;b--;
		G[a].pb(b);
		G[b].pb(a);
	}
	if(n==2){
		cout<<"1 2"<<endl;
		return 0;
	}
	bool h=false;
	rep(i,n)if(G[i].size()==n-1)h=true;
	if(h){
		t.pb(n-1);
	}else{
		co=vvi(n,vi(2));
		rep(i,n)if(G[i].size()-1)rep(j,G[i].size()){
			int to=G[i][j];
			co[i][G[to].size()==1]++;
		}else co[i]={-1,-1};
		
		h=true;
		int c1=0;
		
		rep(i,n)if(co[i][0]+1){
			if(co[i][0]==1)c1++;
			else if(co[i][0]-2)h=false;
		}
		if(!h||c1>2){
			cout<<-1<<endl;
			return 0;
		}
		rep(i,n)if(co[i][0]==1){
			dfs(i,-1);
			break;
		}
		vi nt=t;
		reverse(all(t));
		if(t>nt)t=nt;
	}
	vi out;
	out.pb(1);
	t[0]--;
	t.back()--;
	int w=2;
	rep(i,t.size()){
		int nw=w++;
		rep(j,t[i])out.pb(w++);
		out.pb(nw);
	}
	out.pb(n);
	rep(i,out.size())cout<<out[i]<<" \n"[i==out.size()-1];
}















Measured memory_bytes: 19048