...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.BufferedWriter;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Ktulhu {

    public static BufferedReader openReader(String inputFile) throws IOException {
        FileInputStream fis = new FileInputStream(inputFile);
        return new BufferedReader(
                new InputStreamReader(fis, "UTF-8")
        );
    }

    public static BufferedWriter openWriter(String outputFile) throws IOException {
        FileOutputStream fos = new FileOutputStream(outputFile);
        return new BufferedWriter(
                new OutputStreamWriter(fos, "UTF-8")
        );
    }

    public static Scanner openScanner(BufferedReader reader) throws IOException {
        return new Scanner(reader);
    }

    public void process() throws IOException {
        try (
                BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
                Scanner scanner = openScanner(reader)
        ) {
            int n = scanner.nextInt();
            int m = scanner.nextInt();

            Graph graph = new Graph(n);
            for (int i = 0; i < m; i++) {
                int v = scanner.nextInt();
                int u = scanner.nextInt();
                graph.addEdge(v - 1, u - 1);
            }

            String result;
            if (isKtulhu(graph)) {
                result = "FHTAGN!";
            } else {
                result = "NO";

            }
            System.out.println(result);
        }
    }

    /**
     * Algorithm:
     * <ul>
     * <li>check connectivity</li>
     * <li> compare edges and nodes count</li>
     * </ul>
     *
     * @param graph Graph object with edges/nodes initialized
     * @return true if graph is Ktulhu graph
     */

    public boolean isKtulhu(Graph graph) {
        graph.dfs(graph, 0);
        return graph.isAllVertexVisited() && graph.getEdgesCount() == graph.getNodesCount();
    }

    public static void main(String[] args) throws IOException {
        Ktulhu problem = new Ktulhu();
        problem.process();
    }
}

class Graph {
    private int nodesCount;
    private int edgesCount;
    private Vertex[] nodes;
    private VertexState visited[];
    private int time;

    Graph(int nodesCount) {
        this.nodesCount = nodesCount;
        nodes = new Vertex[nodesCount];
        visited = new VertexState[nodesCount];
        for (int i = 0; i < nodes.length; i++) {
            nodes[i] = new Vertex();
            visited[i] = new VertexState();
        }
    }

    public int getNodesCount() {
        return nodesCount;
    }

    public int getEdgesCount() {
        return edgesCount;
    }

    public void addEdge(int u, int v) {
        nodes[v].addEdge(u);
        nodes[u].addEdge(v);
        edgesCount++;
    }

    public void removeEdge(int u, int v) {
        nodes[v].removeEdge(u);
        nodes[u].removeEdge(v);
        edgesCount--;
    }

    public List<Integer> getEdges(int id) {
        return nodes[id].getEdges();
    }

    public boolean isAllVertexVisited() {
        for (VertexState aVisited : visited) {
            if (aVisited.getColor() != VertexState.Color.BLACK) {
                // graph is not connected
                return false;
            }
        }
        return true;

    }

    public void clearVertexState() {
        for (int i = 0; i < nodes.length; i++) {
            visited[i] = new VertexState();
        }
        time = 0;
    }

    public VertexState[] getVertexStates() {
        return visited;
    }

    public VertexState getVertexState(int i) {
        return visited[i];
    }

    public void setColor(int i, VertexState.Color color) {
        visited[i].setColor(color);
        if (VertexState.Color.BLACK == color) {
            visited[i].setFinishTime(time++);
        } else if (VertexState.Color.GRAY == color) {
            visited[i].setDiscoverTime(time++);
        }
    }

    public VertexState.Color getColor(int i) {
        return visited[i].getColor();
    }

    public int getDiscoveryTime(int i) {
        return visited[i].getDiscoverTime();
    }

    public int getFinishTime(int i) {
        return visited[i].getFinishTime();
    }

    public void dfs(Graph graph, Integer current) {
        graph.setColor(current, VertexState.Color.GRAY);
        for (Integer edge : graph.getEdges(current)) {
            if (graph.getColor(edge) == VertexState.Color.WHITE) {
                dfs(graph, edge);
            }
        }
        graph.setColor(current, VertexState.Color.BLACK);
    }

    static class Edge {
        private int vertex1;
        private int vertex2;

        Edge(int vertex1, int vertex2) {
            this.vertex1 = vertex1;
            this.vertex2 = vertex2;
        }

        public int getVertex1() {
            return vertex1;
        }

        public int getVertex2() {
            return vertex2;
        }
    }

    static class VertexState {
        public enum Color {
            BLACK, GRAY, WHITE
        }

        private Color color;
        private int discoverTime;
        private int finishTime;

        VertexState() {
            color = Color.WHITE;
        }

        public Color getColor() {
            return color;
        }

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

        public int getDiscoverTime() {
            return discoverTime;
        }

        public void setDiscoverTime(int discoverTime) {
            this.discoverTime = discoverTime;
        }

        public int getFinishTime() {
            return finishTime;
        }

        public void setFinishTime(int finishTime) {
            this.finishTime = finishTime;
        }
    }

    static class Vertex {
        private List<Integer> list = new ArrayList<>();

        public void addEdge(Integer edge) {
            list.add(edge);
        }

        public void removeEdge(Integer edge) {
            list.remove(edge);
        }

        public List<Integer> getEdges() {
            return list;
        }
    }
}
