#include <bits/stdc++.h>   using namespace std;   int p[110];   int find(int v) {     if (p[v] == v) return v;     return p[v] = find(p[v]);   }   bool merge(int u, int v) {     int x = find(u);     int y = find(v);     if (x != y) {       p[x] = y;       return true;     }     return false;   }   int main() {     int n, m;     cin >> n >> m;     vector<pair<int, int> > edges;     for (int i = 0; i < m; i++) {       int a, b;       cin >> a >> b;       edges.push_back({a, b});       p[a] = a;       p[b] = b;     }     int flag = 0, count = 1;     for (pair<int, int> e : edges) {       int a = e.first, b = e.second;       if (!merge(a, b)) {         flag++;         if (flag > 1) break;       } else         count++;     }     if (flag == 1 && count == n)       cout <<  FHTAGN!             <<   n ;     else       cout <<  NO             <<   n ;     return 0;   }   