The Resistance is trying to take control over as many planets of a particular solar system as possible. Princess Heidi is in charge of the fleet, and she must send ships to some planets in order to maximize the number of controlled planets.

The Galaxy contains N planets, connected by bidirectional hyperspace tunnels in such a way that there is a unique path between every pair of the planets.

A planet is controlled by the Resistance if there is a Resistance ship in its orbit, or if the planet lies on the shortest path between some two planets that have Resistance ships in their orbits.

Heidi has not yet made up her mind as to how many ships to use. Therefore, she is asking you to compute, for every K = 1, 2, 3, ..., N, the maximum number of planets that can be controlled with a fleet consisting of K ships.

Input

The first line of the input contains an integer N (1 ≤ N ≤ 105) – the number of planets in the galaxy.

The next N - 1 lines describe the hyperspace tunnels between the planets. Each of the N - 1 lines contains two space-separated integers u and v (1 ≤ u, v ≤ N) indicating that there is a bidirectional hyperspace tunnel between the planets u and v. It is guaranteed that every two planets are connected by a path of tunnels, and that each tunnel connects a different pair of planets.

Output

On a single line, print N space-separated integers. The K-th number should correspond to the maximum number of planets that can be controlled by the Resistance using a fleet of K ships.

Examples

Input

3
1 2
2 3


Output

1 3 3 

Input

4
1 2
3 2
4 2


Output

1 3 4 4 

Note

Consider the first example. If K = 1, then Heidi can only send one ship to some planet and control it. However, for K ≥ 2, sending ships to planets 1 and 3 will allow the Resistance to control all planets.
import java.io.*;
import java.util.*;

public class B2 implements Runnable{
	public static void main (String[] args) {new Thread(null, new B2(), "_cf", 1 << 28).start();}

	int n;
	IntList[] adj;
	Node[] a;
	
	public void run() {
		DeoxysS fs = new DeoxysS();
		PrintWriter out = new PrintWriter(System.out);
		System.err.println("Go!");

		n = fs.nextInt();
		adj = new IntList[n];
		for(int i = 0; i < n; i++) adj[i] = new IntList();
		for(int i = 0; i < n - 1; i++) {
			int u = fs.nextInt() - 1;
			int v = fs.nextInt() - 1;
			adj[u].add(v); adj[v].add(u);
		}
		int maxDist = 0;
		int[] dist = new int[n]; Arrays.fill(dist, n + 1); dist[0] = 0;
		ArrayDeque<Integer> bfs = new ArrayDeque<>(); bfs.add(0);
		while(!bfs.isEmpty()) {
			int u = bfs.poll();
			maxDist = Math.max(maxDist, dist[u]);
			for(int i = 0; i < adj[u].size(); i++) {
				int v = adj[u].get(i);
				if(dist[v] < n) continue;
				dist[v] = dist[u] + 1;
				bfs.add(v);
			}
		}
		int leaf = -1;
		for(int i = 0; i < n && leaf < 0; i++)
			if(dist[i] == maxDist)
				leaf = i;
		
		a = new Node[n];
		dfs(leaf, -1);
		TreeSet<Node> set = new TreeSet<>();
		for(int i = 0; i < n; i++)
			if(i != leaf) set.add(a[i]);
		
		int[] res = new int[n];
		int ptr = 0, cnt = 1;
		res[ptr++] = 1;
		boolean[] rem = new boolean[n]; rem[leaf] = true;
		while(!set.isEmpty()) {
			Node now = set.pollFirst();
			int at = now.pathId;
			while(at != -1 && at != now.par) {
				cnt++;
				set.remove(a[at]);
				at = a[at].par;
			}
			res[ptr++] = cnt;
		}
		for(int i = ptr; i < n; i++) res[i] = res[i - 1];

		for(int i = 0; i < n; i++) out.print(res[i] + " ");
		
		out.close();
	}
	
	void dfs(int u, int p) {
		a[u] = new Node(u); a[u].par = p;
		int max = 0, maxId = -1;
		for(int i = 0; i < adj[u].size(); i++) {
			int v = adj[u].get(i);
			if(v == p) continue;
			dfs(v, u);
			if(a[v].path > max) {
				max = a[v].path;
				maxId = a[v].pathId;
			}
		}
		max++;
		a[u].path = max; a[u].pathId = maxId;
		if(maxId < 0) a[u].pathId = u;
	}

	class Node implements Comparable<Node> {
		int id, path, pathId, par;
		Node(int a) { id = a; }
		public int compareTo(Node n) {
			if(n.path == path) return Integer.compare(id, n.id);
			return Integer.compare(n.path, path);
		}
		public String toString() { return "Me " + (id+1) + " Par " + (par+1) + " Len " + path; }
	}
	
	//@
	static class IntList {
		static int[] EMPTY = {};
		int n = 0, a[] = EMPTY;
		void add(int v) {
			if (n >= a.length)
				a = Arrays.copyOf(a, (n << 2) + 8);
			a[n++] = v;
		}
		int get(int idx) { return a[idx]; }
		int size() { return n; }
	}

	void sort (int[] a) {
		int n = a.length;
		for(int i = 0; i < 50; i++) {
			Random r = new Random();
			int x = r.nextInt(n), y = r.nextInt(n);
			int temp = a[x];
			a[x] = a[y];
			a[y] = temp;
		}
		Arrays.sort(a);
	}

	class DeoxysS {
		public int BS = 1<<16;
		public char NC = (char)0;
		byte[] buf = new byte[BS];
		int bId = 0, size = 0;
		char c = NC;
		double num = 1;
		BufferedInputStream in;

		public DeoxysS() {
			in = new BufferedInputStream(System.in, BS);
		}

		public DeoxysS(String s) throws FileNotFoundException {
			in = new BufferedInputStream(new FileInputStream(new File(s)), BS);
		}

		public char nextChar(){
			while(bId==size) {
				try {
					size = in.read(buf);
				}catch(Exception e) {
					return NC;
				}                
				if(size==-1)return NC;
				bId=0;
			}
			return (char)buf[bId++];
		}

		public int nextInt() {
			return (int)nextLong();
		}

		public long nextLong() {
			num=1;
			boolean neg = false;
			if(c==NC)c=nextChar();
			for(;(c<'0' || c>'9'); c = nextChar()) {
				if(c=='-')neg=true;
			}
			long res = 0;
			for(; c>='0' && c <='9'; c=nextChar()) {
				res = (res<<3)+(res<<1)+c-'0';
				num*=10;
			}
			return neg?-res:res;
		}

		public double nextDouble() {
			double cur = nextLong();
			return c!='.' ? cur:cur+nextLong()/num;
		}

		public String next() {
			StringBuilder res = new StringBuilder();
			while(c<=32)c=nextChar();
			while(c>32) {
				res.append(c);
				c=nextChar();
			}
			return res.toString();
		}

		public String nextLine() {
			StringBuilder res = new StringBuilder();
			while(c<=32)c=nextChar();
			while(c!='\n') {
				res.append(c);
				c=nextChar();
			}
			return res.toString();
		}

		public boolean hasNext() {
			if(c>32)return true;
			while(true) {
				c=nextChar();
				if(c==NC)return false;
				else if(c>32)return true;
			}
		}
		
		public int[] nextIntArray(int n) {
			int[] res = new int[n];
			for(int i = 0; i < n; i++) res[i] = nextInt();
			return res;
		}
		
	}

}