#include using namespace std; #define int long long const int maxn=1e6+5; vector > a[maxn]; bool used[maxn]; int c[2];vector g;int col[maxn]; void dfs(int x) { used[x]=true;g.push_back(x); c[col[x]]++; for(auto [v,w]:a[x]) { if(!used[v]) { col[v]=(col[x]^w); dfs(v); } } } int32_t main() { ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0); int n,m;cin>>n>>m; for(int i=0;i>x>>s>>y;--x;--y; if(s[2]=='=') {a[x].push_back({y,0});a[y].push_back({x,0});} else {a[x].push_back({y,1});a[y].push_back({x,1});} } for(int i=0;i