#include using namespace std; using ll = long long; #include int main(){ int n,m; cin>>n>>m; vector u(m),v(m); vector s(m); atcoder::dsu uf(n); vector p(n,0); for(int i = 0;i>u[i]>>s[i]>>v[i]; u[i]--;v[i]--; if(s[i]=="<=/=>") { p[i] = 1; continue; } uf.merge(u[i],v[i]); } vector vis(n,0); bool ok = true; vector> g(n); atcoder::dsu u1(2*n); for(int i = 0;i use(n,0); int all = 0; for(int i = 0;i que; que.push_back(i); vis[i] = 1; for(int j = 0;j=b) ok = 1; else ok = 2; for(int j = 0;j ans; for(int i = 0;i