#include #include #include #define nmax 1005 #define mod 666013 using namespace std; vector H[mod]; vector > sol; int n, m, x, y, encoded; pair decoded; int encode(int x, int y) { return (x<<11) + y; } pair decode(int t) { int x = t >> 11; int y = t - (x<<11); return make_pair(x, y); } 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