Problem: Recently, Berland faces federalization requests more and more often. The proponents propose to divide the country into separate states. Moreover, they demand that there is a state which includes exactly k towns.

Currently, Berland has n towns, some pairs of them are connected by bilateral roads. Berland has only n - 1 roads. You can reach any city from the capital, that is, the road network forms a tree.

The Ministry of Roads fears that after the reform those roads that will connect the towns of different states will bring a lot of trouble.

Your task is to come up with a plan to divide the country into states such that:

  * each state is connected, i.e. for each state it is possible to get from any town to any other using its roads (that is, the roads that connect the state towns), 
  * there is a state that consisted of exactly k cities, 
  * the number of roads that connect different states is minimum. 

Input

The first line contains integers n, k (1 ≤ k ≤ n ≤ 400). Then follow n - 1 lines, each of them describes a road in Berland. The roads are given as pairs of integers xi, yi (1 ≤ xi, yi ≤ n; xi ≠ yi) — the numbers of towns connected by the road. Assume that the towns are numbered from 1 to n.

Output

The the first line print the required minimum number of "problem" roads t. Then print a sequence of t integers — their indices in the found division. The roads are numbered starting from 1 in the order they follow in the input. If there are multiple possible solutions, print any of them.

If the solution shows that there are no "problem" roads at all, print a single integer 0 and either leave the second line empty or do not print it at all.

Examples

Input

5 2
1 2
2 3
3 4
4 5


Output

1
2


Input

5 3
1 2
1 3
1 4
1 5


Output

2
3 4


Input

1 1


Output

0

Solution (in JAVA):

Solution:
import java.util.*;

import java.io.*;

public class Main {
    public static void main(String[] args) throws IOException {
        FastScanner in = new FastScanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
        new Main().run(in, out);
        out.close();
    }

    int n;
    int K;
    List<Edge>[] adj;

    void run(FastScanner in, PrintWriter out) {

        // identify state with k nodes that will minimize problem roads
        n = in.nextInt();
        K = in.nextInt();

        if (n == K) {
            out.println(0);
            return;
        }

        adj = new List[n];
        for (int i = 0; i < n; i++) adj[i] = new ArrayList<>();

        for (int i = 1; i < n; i++) {
            int u = in.nextInt()-1;
            int v = in.nextInt()-1;
            adj[u].add(new Edge(v, i));
            adj[v].add(new Edge(u, i));
        }

        go(0, -1, -1);
        out.println(ret);

        for (int i : retEdges) out.print(i + " ");
        out.println();
    }

    long ret = Integer.MAX_VALUE;
    List<Integer> retEdges;
    List<Integer>[][][] cutEdges = new List[404][][];
    long[] go(int u, int p, int parentEdgeIndex) {

        // dp[i][j] = min cost with j nodes rooted at u
        long[][] dp = new long[adj[u].size()+1][K+1];
        cutEdges[u] = new List[adj[u].size() + (p == -1 ? 1 : 0)][K+1];
        for (int i = 0; i < cutEdges[u].length; i++)
            for (int k = 0; k < K+1; k++) cutEdges[u][i][k] = new ArrayList<>();

        for (long[] d : dp) Arrays.fill(d, Integer.MAX_VALUE);
        dp[0][0] = 0;
        dp[0][1] = 0;

        int i = 0;
        for (Edge e : adj[u]) {
            int v = e.v;

            if (v == p) continue;

            long[] child = go(v, u, e.index);

            for (int k = 0; k <= K && dp[i][k] != Integer.MAX_VALUE; k++) {

                for (int pk = 0; pk+k <= K && child[pk] != Integer.MAX_VALUE; pk++) {
                    if (k == 0 && pk == 0) {
                        // if we choose 0 nodes from child v and v is also not part of K
                        // we are all part of the same state => 0 bad roads
                        dp[i+1][0] = 0;
                    } else if (pk == 0) {
                        // otherwise, if we choose 0 nodes from pk, there will be a
                        // problem road from child v to u
                        if (dp[i][k] + child[pk] + 1 < dp[i+1][pk+k]) {
                            dp[i+1][pk+k] = dp[i][k] + child[pk] + 1;
                            cutEdges[u][i+1][pk+k].clear();
                            cutEdges[u][i+1][pk+k].addAll(cutEdges[u][i][k]);
                            cutEdges[u][i+1][pk+k].add(e.index);
                        }

                    } else if (k == 0) {
                        // if we are not rooted at u,
                        // choosing k is meaningless
                        continue;
                    } else {
                        // we take the pk nodes rooted at v and connect it to
                        // k nodes rooted at u
                        if (dp[i][k] + child[pk] < dp[i+1][pk+k]) {
                            dp[i+1][pk+k] = dp[i][k] + child[pk];
                            cutEdges[u][i+1][pk+k].clear();
                            cutEdges[u][i+1][pk+k].addAll(cutEdges[u][i][k]);
                            cutEdges[u][i+1][pk+k]
                                .addAll(cutEdges[v][cutEdges[v].length-1][pk]);
                        }
                    }
                } // end pk
            } // end k
            i++;
        }

        // for (int j = 0; j < cutEdges[u].length; j++) {
        //     System.out.println("cutEdges for " + (u+1));
        //     System.out.println(Arrays.toString(dp[j]));
        //     System.out.println(Arrays.toString(cutEdges[u][j]));
        //     System.out.println();
        // }

        // potential cost is if we are rooted at u with size K,
        // +1 to connect parent, unless we are root
        if (dp[i][K] != Integer.MAX_VALUE) {
            if (dp[i][K] + (u == 0 ? 0 : 1) < ret) {
                ret = dp[i][K] + (u == 0 ? 0 : 1);
                retEdges = new ArrayList<>(cutEdges[u][i][K]);
                if (parentEdgeIndex != -1) retEdges.add(parentEdgeIndex);
            }
        }
        return dp[i];
    }

    class Edge {
        int v;
        int index;
        Edge(int v, int index) {
            this.v = v;
            this.index = index;
        }
    }


    static class FastScanner {
        BufferedReader br;
        StringTokenizer st;

        public FastScanner(InputStream in) {
            br = new BufferedReader(new InputStreamReader(in));
            st = null;
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }
    }
}