...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.

<image>

Input

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 ≤ <image>).

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.

Output

Print "NO", if the graph is not Cthulhu and "FHTAGN!" if it is.

Examples

Input

6 6
6 3
6 4
5 1
2 5
1 4
5 4


Output

FHTAGN!

Input

6 5
5 6
4 6
3 1
5 1
1 2


Output

NO

Note

Let us denote as a simple cycle a set of v vertices that can be numbered so that the edges will only exist between vertices number 1 and 2, 2 and 3, ..., v - 1 and v, v and 1.

A tree is a connected undirected graph consisting of n vertices and n - 1 edges (n > 0).

A rooted tree is a tree where one vertex is selected to be the root.
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

/**
 * Created by IntelliJ IDEA.
 * User: alexsen
 * Date: 3/25/12
 * Time: 9:49 PM
 */
public class Fhtagn {
    protected static int n = 0;
    protected static int m = 0;
    public static void main(String[] args){
        try{
            CirclesFinder finder = new CirclesFinder();
            Node[] all = readNodes();
            if(!preCheck(all)){
                System.out.println("NO");
                return;
            }

            finder.fhtagn(all[0]);

            if(!postCheck(all)){
                System.out.println("NO");
                return;
            }
            System.out.println("FHTAGN!");
        }catch(IOException e){
            e.printStackTrace();
        }
    }
    
    protected static Node[] readNodes()throws IOException{
        Reader reader = new Reader();
        n = reader.next();
        m = reader.next();
        
        Node[] all = new Node[n];
        for(int i = 0; i < n; ++i){
            all[i] = new Node(i);
        }
        for(int i = 0; i<m; ++i){
            int id1 = reader.next()-1;
            int id2 = reader.next()-1;
            all[id1].getNeighbors().add(all[id2]);
            all[id2].getNeighbors().add(all[id1]);
        }
        return all;
    }

    protected static boolean preCheck(Node[] all){
        if(all.length < 3) return false;
        if(m!=n) return false;
        
        return true;
    }

    protected static boolean postCheck(Node[] all){
        for(Node n : all){
            if(n.getColor().equals(Color.WHITE)) return false;
        }
        return true;
    }



}

class CirclesFinder{
    protected void fhtagn(Node start){
        start.setVisits(1);
        start.setColor(Color.GRAY);
        dfs(start);
        start.setColor(Color.BLACK);
    }

    protected void dfs(Node next){
        for(int i = 0 ; i < next.getNeighbors().size() ; ++ i)
        {
            Node n = next.getNeighbors().get(i); 
            if(n.getColor()==Color.WHITE){
                n.setVisits(1);
                n.setColor(Color.GRAY);
                n.setParent(next);
                dfs(n);
                n.setColor(Color.BLACK);
            }
        }
    }

}
enum Color{WHITE,GRAY,BLACK};

class Node{
    protected Array neighbors;
    protected int id;
    protected int visits;
    protected Color color;
    protected Node parent;
    
    Node(int id) {
        this.id = id;
        neighbors = new Array();
        visits = 0;
        color = Color.WHITE;
    }


    public Node getParent() {
        return parent;
    }

    public void setParent(Node parent) {
        this.parent = parent;
    }

    public Color getColor() {
        return color;
    }

    public void setColor(Color color) {
        this.color = color;
    }

    public int getVisits() {
        return visits;
    }

    public void setVisits(int visits) {
        this.visits = visits;
    }

    public Array getNeighbors() {
        return neighbors;
    }


    public int getId() {
        return id;
    }
}

class Array{
    protected Node[] es;
    protected int size = 0;
    protected int sizeMax = 2;

    Array() {
        es = new Node[sizeMax];
    }

    void add(Node e){
        if(size+1 == sizeMax){
            sizeMax *= 2;
            Node[] esNew = new Node[sizeMax];
            for(int i = 0; i < size ; ++i){
                esNew[i] = es[i];
            }
            es = esNew;
        }
        es[size] = e;
        ++size;
    }

    int size(){
        return size;
    }

    Node get(int i){
        return es[i];
    }
}




class Reader{
    /*int next(){
        return values[index++];
    }
    int[] values = {6, 5,5, 6,4, 6,3, 1,5, 1, 1, 2};*/
    Reader() {
        InputStreamReader converter = new InputStreamReader(System.in);
        reader = new BufferedReader(converter);
    }

    int next()throws IOException{
        if(needToRead){
            needToRead = false;
            buffer = reader.readLine();
            int iSep = buffer.indexOf(" ");
            int result =  Integer.parseInt(buffer.substring(0,iSep));
            buffer = buffer.substring(iSep+1);
            return result;
        }
        else{
            needToRead = true;
            return Integer.parseInt(buffer);
        }
    }
    protected int index = 0;
    protected String buffer;   
    protected boolean needToRead=true;
    BufferedReader reader;
}