You've got a undirected graph G, consisting of n nodes. We will consider the nodes of the graph indexed by integers from 1 to n. We know that each node of graph G is connected by edges with at least k other nodes of this graph. Your task is to find in the given graph a simple cycle of length of at least k + 1.

A simple cycle of length d (d > 1) in graph G is a sequence of distinct graph nodes v1, v2, ..., vd such, that nodes v1 and vd are connected by an edge of the graph, also for any integer i (1 ≤ i < d) nodes vi and vi + 1 are connected by an edge of the graph.

Input

The first line contains three integers n, m, k (3 ≤ n, m ≤ 105; 2 ≤ k ≤ n - 1) — the number of the nodes of the graph, the number of the graph's edges and the lower limit on the degree of the graph node. Next m lines contain pairs of integers. The i-th line contains integers ai, bi (1 ≤ ai, bi ≤ n; ai ≠ bi) — the indexes of the graph nodes that are connected by the i-th edge. 

It is guaranteed that the given graph doesn't contain any multiple edges or self-loops. It is guaranteed that each node of the graph is connected by the edges with at least k other nodes of the graph.

Output

In the first line print integer r (r ≥ k + 1) — the length of the found cycle. In the next line print r distinct integers v1, v2, ..., vr (1 ≤ vi ≤ n) — the found simple cycle.

It is guaranteed that the answer exists. If there are multiple correct answers, you are allowed to print any of them.

Examples

Input

3 3 2
1 2
2 3
3 1


Output

3
1 2 3 

Input

4 6 3
4 3
1 2
1 3
1 4
2 3
2 4


Output

4
3 4 1 2 
#include <bits/stdc++.h>
using namespace std;
template <typename T, typename T1>
T amax(T &a, T1 b) {
  if (b > a) a = b;
  return a;
}
template <typename T, typename T1>
T amin(T &a, T1 b) {
  if (b < a) a = b;
  return a;
}
vector<long long int> adj[100001];
long long int parent[100001];
long long int vis[100001];
long long int n, m, k, node1;
vector<long long int> v2;
bool isPrime(long long int n);
long long int pw(long long int x, long long int y);
long long int fact(long long int n);
bool cyclesize(long long int node, long long int neww) {
  int x = node;
  vector<int> ans;
  while (x != neww) {
    ans.push_back(x);
    x = parent[x];
  }
  ans.push_back(x);
  if (ans.size() > k) {
    cout << ans.size() << ("\n");
    for (int i : ans) cout << i << " ";
    exit(0);
  } else
    return false;
}
bool dfs(long long int node, long long int par) {
  vis[node] = 1;
  parent[node] = par;
  for (auto it : adj[node]) {
    if (vis[it] != 1) {
      if (dfs(it, node)) return true;
    } else {
      if (it != par && cyclesize(node, it)) {
        return true;
      }
    }
  }
  return false;
}
void solve() {
  map<long long int, long long int> m1;
  string s, s1, s2, s3, s4, t;
  char ch1, ch2, ch3;
  long long int i{}, j{}, x{}, y{}, z{}, u{}, l{}, h{}, w{}, o{}, p{}, q{}, r{},
      a{}, b{}, c{}, d{}, e{}, sum{}, ans{}, ans2{10000000}, ans1{10000000};
  memset(parent, -1, sizeof(parent));
  memset(vis, 0, sizeof(vis));
  cin >> n >> m >> k;
  for (i = 0; i < m; ++i) {
    cin >> x >> y;
    adj[x].push_back(y);
    adj[y].push_back(x);
  }
  dfs(1, -1);
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  solve();
}
bool isPrime(long long int n) {
  if (n <= 1) return false;
  if (n <= 3) return true;
  if (n % 2 == 0 || n % 3 == 0) return false;
  for (long long int i = 5; i * i <= n; i = i + 6)
    if (n % i == 0 || n % (i + 2) == 0) return false;
  return true;
}
long long int pw(long long int x, long long int y) {
  long long int i = 0;
  long long int ans = 1;
  for (i = 1; i <= y; ++i) ans = (ans * x) % 998244353;
  return ans;
}
long long int fact(long long int n) {
  long long int ans = 1;
  for (long long int i = 1; i <= n; ++i) ans = (ans * i) % 1000000007;
  return ans;
}
