...Once upon a time a man came to the sea. The sea was stormy and dark. The man started to call for the little mermaid to appear but alas, he only woke up Cthulhu...

Whereas on the other end of the world Pentagon is actively collecting information trying to predict the monster's behavior and preparing the secret super weapon. Due to high seismic activity and poor weather conditions the satellites haven't yet been able to make clear shots of the monster. The analysis of the first shot resulted in an undirected graph with *n* vertices and *m* edges. Now the world's best minds are about to determine whether this graph can be regarded as Cthulhu or not.

To add simplicity, let's suppose that Cthulhu looks from the space like some spherical body with tentacles attached to it. Formally, we shall regard as Cthulhu such an undirected graph that can be represented as a set of three or more rooted trees, whose roots are connected by a simple cycle.

It is guaranteed that the graph contains no multiple edges and self-loops.
The first line contains two integers — the number of vertices *n* and the number of edges *m* of the graph (1 ≤ *n* ≤ 100, 0 ≤ *m* ≤ <img align="middle" class="tex-formula" src="https://espresso.codeforces.com/b6fbba87a6e66854e5728f67cc384b75c4bcf131.png" style="max-width: 100.0%;max-height: 100.0%;"/>).

Each of the following *m* lines contains a pair of integers *x* and *y*, that show that an edge exists between vertices *x* and *y* (1 ≤ *x*, *y* ≤ *n*, *x* ≠ *y*). For each pair of vertices there will be at most one edge between them, no edge connects a vertex to itself.
6 6
6 3
6 4
5 1
2 5
1 4
5 4
FHTAGN!
6 5
5 6
4 6
3 1
5 1
1 2
NO
10 10
4 10
8 5
2 8
4 9
9 3
2 7
10 6
10 2
9 8
1 8
FHTAGN!
5 4
1 5
1 3
1 4
3 2
NO
12 12
4 12
4 7
4 9
7 2
5 12
2 1
5 9
8 6
10 12
2 5
10 9
12 3
NO
12 15
3 2
11 12
1 9
2 1
1 8
9 6
11 5
9 5
9 10
11 3
7 11
5 6
11 10
4 6
4 2
NO
12 10
1 11
3 6
5 7
4 7
6 8
11 7
3 12
11 12
7 9
12 2
NO
1 0
NO
2 1
1 2
NO
3 1
1 3
NO
3 2
1 2
2 3
NO
3 3
1 2
2 3
3 1
FHTAGN!
4 4
1 2
3 4
4 1
2 4
FHTAGN!
6 6
1 2
2 3
3 1
4 5
5 6
6 4
NO
2 0
NO
3 0
NO
100 0
NO
100 1
11 23
NO
10 10
5 7
8 1
10 3
6 4
10 6
5 3
5 6
2 6
4 3
2 10
NO
20 20
9 10
4 19
9 20
12 20
1 15
2 12
19 10
19 15
4 10
4 8
8 9
20 8
6 2
2 15
7 19
20 4
3 16
1 20
9 1
20 10
NO
30 30
17 6
16 29
16 13
16 20
29 26
17 5
27 28
24 16
7 18
24 10
1 27
12 17
27 30
6 1
3 30
5 19
18 13
16 2
30 1
5 8
14 16
26 18
7 19
5 6
23 14
6 8
23 8
18 8
18 3
5 21
NO
100 66
41 14
19 13
70 43
79 62
9 62
71 40
53 86
80 4
34 33
72 68
40 96
84 59
36 77
55 50
40 3
79 81
3 43
33 47
22 98
33 90
56 49
69 28
73 30
65 22
98 20
9 52
54 20
32 70
51 80
63 12
21 48
35 17
48 87
25 43
65 80
42 3
86 35
95 98
43 59
51 46
66 37
88 34
32 47
24 42
21 44
92 59
81 6
100 82
85 6
58 25
66 6
14 32
59 85
3 98
44 4
85 51
69 41
80 70
81 24
75 71
93 9
82 55
70 46
66 32
77 58
11 46
NO
4 4
1 2
4 3
2 3
3 1
FHTAGN!
5 5
2 3
2 4
5 4
4 1
1 2
FHTAGN!
10 10
1 10
5 9
6 2
8 9
9 1
5 4
2 8
1 3
6 3
4 1
NO
6 6
1 2
2 3
3 1
4 5
5 6
6 4
NO
4 3
1 2
2 3
3 1
NO
6 5
1 2
2 3
3 1
1 4
1 5
NO
// Template begins
#include <iostream>
#include <algorithm>
#include <vector>
#include <set>
#include <stdio.h>
#include <stack>
#include <map>
#include <cmath>
using namespace std;
#define fio ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define ll long long
#define endl "\n"
#define lb lower_bound
#define ub upper_bound
#define fo(i,a,b) for(i=a;i<=b;i++)
#define all(v) (v).begin(),(v).end()
#define sort0(v) sort(all(v))
#define lbb(a,b,arr,x) lower_bound(arr+a,arr+b+1,x)-arr
#define ubb(a,b,arr,x) upper_bound(arr+a,arr+b+1,x)-arr
#define freq(a,b,arr,x) upper_bound(arr+a,arr+b+1,x)-lower_bound(arr+a,arr+b+1,x)
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
#define d0(x) cout<<(x)<<" "
#define d1(x) cout<<(x)<<endl
#define d2(x,y) cout<<(x)<<" "<<(y)<<endl
#define d3(x,y,z) cout<<(x)<<" "<<(y)<<" "<<(z)<<endl
#define d4(a,b,c,d) cout<<(a)<<" "<<(b)<<" "<<(c)<<" "<<(d)<<endl
#define d5(a,b,c,d,e) cout<<(a)<<" "<<(b)<<" "<<(c)<<" "<<(d)<<" "<<(e)<<endl
#define d6(a,b,c,d,e,f) cout<<(a)<<" "<<(b)<<" "<<(c)<<" "<<(d)<<" "<<(e)<<" "<<(f)<<endl
#define max3(a,b,c) max(max((a),(b)),(c))
#define max4(a,b,c,d) max(max((a),(b)),max((c),(d)))
#define ss second
#define ff first
#define pb push_back
#define mp make_pair
#define printp(x) cout << x.ff << " " << x.ss << endl
template<class T> ostream& operator<<(ostream &os, vector<T> V) {
    for(auto v : V) os << v << " ";
    return cout << "";
}
template<class T> ostream& operator<<(ostream &os, set<T> S){
    for(auto s:S) os<<s<<" ";
    return cout << "";
}
template<class L, class R> ostream& operator<<(ostream &os, pair<L,R> P) {
    return os << P.first << " " << P.second;
}
const ll mod=1e9+7;
#define inf 9999999999999
 
ll inv(ll i){if(i==1) return 1;return (mod-((mod/i)*inv(mod%i))%mod)%mod;}
 
ll gcd(ll a,ll b){ if (b==0) return a;return gcd(b,a%b);}
 
ll pwr(ll a, ll b) {a %= mod; ll res = 1;while (b > 0) {if (b & 1) res = res * a % mod; a = a * a % mod; b >>= 1;}return res;}
//Template ends
int n,m,c=0;
vector<vector<int>> adj;
vector<bool> vis;
void dfs(int u){
    vis[u]=1;
    c++;
    for(auto v:adj[u]){
        if(!vis[v]){
            dfs(v);
        }
    }
}
int main(){
    int T;
//    cin>>T;
    T=1;
    while(T--){
        cin>>n>>m;
        adj.assign(n+1,{});
        vis.assign(n+1,0);
        for(int i=0;i<m;i++){
            int a,b;
            cin>>a>>b;
            adj[a].pb(b);
            adj[b].pb(a);
        }
        dfs(1);
        //cout<<c<<endl;
        if(n==m and c==m)cout<<"FHTAGN!\n";
        else cout<<"NO\n";
    }
}