...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
from __future__ import print_function
import sys
from collections import *
from heapq import *
from functools import *
import re
from itertools import *

INF=float("inf")
NINF=float("-inf")

try:
    input=raw_input
except:
    pass

def read_string():
    return input()

def read_string_line():
    return [x for x in input().split(" ")]

def read_int_line():
    return [int(x) for x in input().split(" ")]

def read_int():
    return int(input())

n,m=read_int_line()
adjs=[[] for _ in range(n)]
for _ in range(m):
    a,b=read_int_line()
    adjs[a-1].append(b-1)
    adjs[b-1].append(a-1)
degs=[-1]*n
st=[]
circle=[]
def dfs(x, pre,deg):
    degs[x]=deg
    st.append(x)
    for to in adjs[x]:
        if to==pre:continue
        if degs[to]==-1:
            if dfs(to,x,deg+1):
                st.pop()
                return True
        else:
            i=st.index(to)
            assert not circle
            circle.extend(st[i:])
            st.pop()
            return True
    st.pop()
    return False

edges=set()
def dfs2(x,pre,deg):
    degs[x]=deg
    for to in adjs[x]:
        if to==pre:continue
        if (x,to) in edges:continue
        dfs2(to,x,deg+1)

dfs(0,-1,0)

if not circle:
    print("NO") 
else:
    degs=[-1]*n
    for i, a in enumerate(circle):
        b=circle[(i+1)%len(circle)]
        edges.add((a,b))
        edges.add((b,a))
    for a in circle:
        if degs[a]!=-1:
            print("NO")
            break
        dfs2(a,-1,0)
    else:
        if -1 in degs:
            print("NO")
        else:
            print("FHTAGN!")



