#include <bits/stdc++.h>
using namespace std;
const int MAXN = 105;
vector<int> adj[MAXN];
bool visited[MAXN];
int n, m, u, v;
int dem_dinh_that = 0;
void dfs(int node, int blocked) {
if (node == blocked) return;
visited[node] = true;
for (int neighbor : adj[node]) {
if (!visited[neighbor]) {
dfs(neighbor, blocked);
}
}
}
bool la_dinh_that(int s) {
fill(visited, visited + n + 1, false);
dfs(u, s);
return !visited[v];
}
int main() {
cin >> n >> m >> u >> v;
for (int i = 0; i < m; i++) {
int a, b;
cin >> a >> b;
adj[a].push_back(b);
adj[b].push_back(a);
}
vector<int> dinh_that;
for (int s = 1; s <= n; s++) {
if (s != u && s != v && la_dinh_that(s)) {
dinh_that.push_back(s);
dem_dinh_that++;
}
}
cout << dem_dinh_that << endl;
for (int s : dinh_that) {
cout << s << " ";
}
if (dem_dinh_that > 0) cout << endl;
return 0;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7Cgpjb25zdCBpbnQgTUFYTiA9IDEwNTsKdmVjdG9yPGludD4gYWRqW01BWE5dOwpib29sIHZpc2l0ZWRbTUFYTl07CmludCBuLCBtLCB1LCB2OwppbnQgZGVtX2RpbmhfdGhhdCA9IDA7IAoKdm9pZCBkZnMoaW50IG5vZGUsIGludCBibG9ja2VkKSB7CiAgICBpZiAobm9kZSA9PSBibG9ja2VkKSByZXR1cm47IAogICAgdmlzaXRlZFtub2RlXSA9IHRydWU7CiAgICBmb3IgKGludCBuZWlnaGJvciA6IGFkaltub2RlXSkgewogICAgICAgIGlmICghdmlzaXRlZFtuZWlnaGJvcl0pIHsKICAgICAgICAgICAgZGZzKG5laWdoYm9yLCBibG9ja2VkKTsKICAgICAgICB9CiAgICB9Cn0KCmJvb2wgbGFfZGluaF90aGF0KGludCBzKSB7CiAgICBmaWxsKHZpc2l0ZWQsIHZpc2l0ZWQgKyBuICsgMSwgZmFsc2UpOwogICAgZGZzKHUsIHMpOyAKICAgIHJldHVybiAhdmlzaXRlZFt2XTsgCn0KCmludCBtYWluKCkgewogICAgY2luID4+IG4gPj4gbSA+PiB1ID4+IHY7CiAgICBmb3IgKGludCBpID0gMDsgaSA8IG07IGkrKykgewogICAgICAgIGludCBhLCBiOwogICAgICAgIGNpbiA+PiBhID4+IGI7CiAgICAgICAgYWRqW2FdLnB1c2hfYmFjayhiKTsKICAgICAgICBhZGpbYl0ucHVzaF9iYWNrKGEpOwogICAgfQoKICAgIHZlY3RvcjxpbnQ+IGRpbmhfdGhhdDsKICAgIGZvciAoaW50IHMgPSAxOyBzIDw9IG47IHMrKykgewogICAgICAgIGlmIChzICE9IHUgJiYgcyAhPSB2ICYmIGxhX2RpbmhfdGhhdChzKSkgewogICAgICAgICAgICBkaW5oX3RoYXQucHVzaF9iYWNrKHMpOwogICAgICAgICAgICBkZW1fZGluaF90aGF0Kys7IAogICAgICAgIH0KICAgIH0KCiAgICBjb3V0IDw8IGRlbV9kaW5oX3RoYXQgPDwgZW5kbDsKICAgIGZvciAoaW50IHMgOiBkaW5oX3RoYXQpIHsKICAgICAgICBjb3V0IDw8IHMgPDwgIiAiOwogICAgfQogICAgaWYgKGRlbV9kaW5oX3RoYXQgPiAwKSBjb3V0IDw8IGVuZGw7CgogICAgcmV0dXJuIDA7Cn0K