#include #include #include #include #include #define f(i, s, k, l) for (int i = s; i < k; i += l) #define for0(i, k) f(i, 0, k, 1) #define pl pair #define pb push_back #define vl vector #define vi vector #define sz(x) (ll)(x).size() using namespace std; using ll = long long; using ld = long double; struct edge { ll to; ld l, v, newv; }; int main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); ll n, m, k, a, b; cin >> n >> m >> k; vector> adj(n); vl deg(n); for0(i, m) { cin >> a >> b; a--; b--; adj[a][b]++; adj[b][a]++; deg[a]++; deg[b]++; } vl choose; for0(i, n) { if (deg[i] == k) { cout << 1 << endl << i + 1 << endl; return 0; } if (deg[i] <= k && deg[i] != 0) choose.pb(i); } for (ll i = 1; i < 1 << min(sz(choose), 20ll); i++) { if (__builtin_popcount(i) < 2 || __builtin_popcount(i) > 12) continue; set check; for (ll j = 0; j < 20; j++) { if ((i >> j) & 1) { if (j < sz(choose)) check.insert(choose[j]); } } ll inside = 0; ll total = 0; for (ll x : check) { for (pl neigh : adj[x]) { if (check.find(neigh.first) != check.end()) inside += neigh.second; else total += neigh.second; } if (total > k) break; } if (total + inside / 2 == k) { cout << sz(check) << endl; for (ll x : check) cout << x + 1 << " "; cout << endl; return 0; } } cout << "impossible" << endl; }