#include <bits/stdc++.h> #define mod 1000000007 #define ull unsigned ll #define ll long long int #define ld long double #define pb push_back #define mp make_pair #define mt make_tuple #define ff first #define ss second #define pi acos(-1) #define nui 100 #define INF 100000000000 #pragma GCC optimize("Ofast") #pragma GCC target("avx,avx2,fma") #pragma GCC optimization ("unroll-loops") #define F(i,a,n) for(ll i=a;i<n;i++) #define B(i,a,n) for(ll i=n-1;i>=a;i--) #define tc int t;cin>>t;while(t--) #define tcf ll t;cin>>t;for(int w=1;w<=t;w++) #define pfn cout<<"-1\n" #define pfp cout<<"1\n"; using namespace std; ll binpow(ll a, ll b) { ll res = 1; while (b > 0) { if (b & 1) { res *= a; } a *= a; b >>= 1; } return res; } void dex(int a) { if (a == 1) { cout << "1\n"; } else if (a == -1) { cout << "-1\n"; } else if (a == 0) { cout << "0\n"; } else if (a == 2) { cout << "YES\n"; } else if (a == 3) { cout << "NO\n"; } } vector<ll>adj[100005]; vector<ll> visited(100005, 0); vector<ll>intime(100005, 0); vector<ll>outime(100005, 0); vector<ll>dis(100005, 0); vector<ll>color(100005, 0); ll tim_e = 0; ll c = 0; bool dfs(ll node) { intime[node] = tim_e++; visited[node] = 1; color[node] = c; for (auto i : adj[node]) { if (!visited[i]) { dis[i] = dis[node] + 1; c ^= 1; bool res = dfs(i); if (res == false) return false; } else { //cout << i << "\n"; if (color[node] == color[i]) { // cout << i << "\n"; return false; } } } outime[node] = tim_e++; return true; } int main() { #ifndef ONLINE_JUDGE freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout); #endif ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); //Checking whether a graph is bi-partite or not! tcf{ ll n, e; cin >> n >> e; ll x, y; for (ll i = 1; i <= n; i++) { adj[i].clear(); visited[i] = 0; // color[i] = 0; } for (ll i = 1; i <= e; i++) { cin >> x >> y; adj[x].pb(y); adj[y].pb(x); } ll cc = 0; bool flag = true; F(i, 1, n + 1) { /*cout << intime[i] << " " << outime[i] << "\n"; cout << "1-->" << i << "=" << dis[i] << "\n";*/ if (!visited[i]) { c = 0; bool clag = dfs(i); if (clag == false) { flag = false; } } } cout << "Scenario #" << w << ":\n"; if (!flag) { cout << "Suspicious bugs found!\n"; } else { cout << "No suspicious bugs found!\n"; } } return 0; }