#include<iostream>
#include<cstdio>
#include<vector>
#include<algorithm>
#define FOR(i,a,b) for(int i=a;i<=b;i++) 
using namespace std;
const int N=100100;
int n,S,T,u,v,m,l,r,sz[N],fa[N],d[N],a[N],b[N],p[N],q[N];
vector<int>ve[N];
void add(int u,int v){ve[u].push_back(v);}
void dfs(int u,int&w){
	if(d[u]>d[w]) w=u;
	for(int v:ve[u])if(v!=fa[u]) fa[v]=u,d[v]=d[u]+1,dfs(v,w);
}
void work(int*p){
	l=u=0;
	FOR(i,1,m){
		p[l+sz[a[i]]+1]=++u;
		FOR(j,1,sz[a[i]]) p[++l]=++u;l++;
	}
}
int main(){
	//freopen("1.in","r",stdin);
	scanf("%d",&n);
	FOR(i,2,n) scanf("%d%d",&u,&v),add(u,v),add(v,u);
	dfs(1,T);fa[T]=d[T]=0;dfs(T,S);
	for(u=S;u;u=fa[u]) a[++m]=u,b[u]=1;
	FOR(i,1,n)if(!b[i] && !b[fa[i]]) return puts("-1"),0;
	FOR(i,1,n)if(!b[i]) sz[fa[i]]++;
	work(p);reverse(a+1,a+m+1);work(q);
	FOR(i,1,n)if(p[i]!=q[i]){
		if(p[i]>q[i]) swap(p,q);
		break;
	}
	FOR(i,1,n) cout<<p[i]<<' ';cout<<'\n';
}