#include #include #include #define nmax 1005 #define mod 66013 using namespace std; vector H[mod]; vector > sol; int n, m, x, y, encoded; pair decoded; int encode(int x, int y) { return (x<<12) + y; } pair decode(int t) { return make_pair(t>>12, t-((t>>12)<<12)); } int main() { cin>>n>>m; for(int i=1; i<=m; i++) { cin>>x>>y; if(x > y) swap(x, y); encoded = encode(x, y); decoded = decode(encoded); int pos = encoded % mod; bool exists = false; for(int j=0; j