#include <bits/stdc++.h>
using namespace std;
const int MAXN = 105;
vector<int> adj[MAXN];
bool visited[MAXN];
int n, m, u, v;
int criticalCount = 0; // Bi?n d?m s? d?nh th?t
void dfs(int node, int blocked) {
if (node == blocked) return; // Không xét d?nh b? ch?n
visited[node] = true;
for (int neighbor : adj[node]) {
if (!visited[neighbor]) {
dfs(neighbor, blocked);
}
}
}
bool isCritical(int s) {
fill(visited, visited + n + 1, false);
dfs(u, s); // Th? b? d?nh s và ki?m tra du?ng di t? u d?n v
return !visited[v]; // N?u không d?n du?c v, thì s là d?nh th?t
}
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> criticalNodes;
for (int s = 1; s <= n; s++) {
if (s != u && s != v && isCritical(s)) {
criticalNodes.push_back(s);
criticalCount++; // Tang bi?n d?m
}
}
cout << criticalCount << endl;
for (int s : criticalNodes) {
cout << s << " ";
}
if (criticalCount > 0) cout << endl;
return 0;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7Cgpjb25zdCBpbnQgTUFYTiA9IDEwNTsKdmVjdG9yPGludD4gYWRqW01BWE5dOwpib29sIHZpc2l0ZWRbTUFYTl07CmludCBuLCBtLCB1LCB2OwppbnQgY3JpdGljYWxDb3VudCA9IDA7IC8vIEJpP24gZD9tIHM/IGQ/bmggdGg/dAoKdm9pZCBkZnMoaW50IG5vZGUsIGludCBibG9ja2VkKSB7CiAgICBpZiAobm9kZSA9PSBibG9ja2VkKSByZXR1cm47IC8vIEtow7RuZyB4w6l0IGQ/bmggYj8gY2g/bgogICAgdmlzaXRlZFtub2RlXSA9IHRydWU7CiAgICBmb3IgKGludCBuZWlnaGJvciA6IGFkaltub2RlXSkgewogICAgICAgIGlmICghdmlzaXRlZFtuZWlnaGJvcl0pIHsKICAgICAgICAgICAgZGZzKG5laWdoYm9yLCBibG9ja2VkKTsKICAgICAgICB9CiAgICB9Cn0KCmJvb2wgaXNDcml0aWNhbChpbnQgcykgewogICAgZmlsbCh2aXNpdGVkLCB2aXNpdGVkICsgbiArIDEsIGZhbHNlKTsKICAgIGRmcyh1LCBzKTsgLy8gVGg/IGI/IGQ/bmggcyB2w6Aga2k/bSB0cmEgZHU/bmcgZGkgdD8gdSBkP24gdgogICAgcmV0dXJuICF2aXNpdGVkW3ZdOyAvLyBOP3Uga2jDtG5nIGQ/biBkdT9jIHYsIHRow6wgcyBsw6AgZD9uaCB0aD90Cn0KCmludCBtYWluKCkgewogICAgY2luID4+IG4gPj4gbSA+PiB1ID4+IHY7CiAgICBmb3IgKGludCBpID0gMDsgaSA8IG07IGkrKykgewogICAgICAgIGludCBhLCBiOwogICAgICAgIGNpbiA+PiBhID4+IGI7CiAgICAgICAgYWRqW2FdLnB1c2hfYmFjayhiKTsKICAgICAgICBhZGpbYl0ucHVzaF9iYWNrKGEpOwogICAgfQoKICAgIHZlY3RvcjxpbnQ+IGNyaXRpY2FsTm9kZXM7CiAgICBmb3IgKGludCBzID0gMTsgcyA8PSBuOyBzKyspIHsKICAgICAgICBpZiAocyAhPSB1ICYmIHMgIT0gdiAmJiBpc0NyaXRpY2FsKHMpKSB7CiAgICAgICAgICAgIGNyaXRpY2FsTm9kZXMucHVzaF9iYWNrKHMpOwogICAgICAgICAgICBjcml0aWNhbENvdW50Kys7IC8vIFRhbmcgYmk/biBkP20KICAgICAgICB9CiAgICB9CgogICAgY291dCA8PCBjcml0aWNhbENvdW50IDw8IGVuZGw7CiAgICBmb3IgKGludCBzIDogY3JpdGljYWxOb2RlcykgewogICAgICAgIGNvdXQgPDwgcyA8PCAiICI7CiAgICB9CiAgICBpZiAoY3JpdGljYWxDb3VudCA+IDApIGNvdXQgPDwgZW5kbDsKCiAgICByZXR1cm4gMDsKfQo=