import java.util.*;

public class MansionColoring {
    static List<List<Integer>> graph;
    static int[] color; // 0 = uncolored, 1 = red, 2 = blue
    static int N, M;

    static boolean dfs(int node, int c) {
        color[node] = c;
        for (int neighbor : graph.get(node)) {
            if (color[neighbor] == 0) {
                if (!dfs(neighbor, 3 - c)) // alternate color
                    return false;
            } else if (color[neighbor] == c) {
                return false; // conflict detected
            }
        }
        return true;
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        if (!sc.hasNextInt()) { System.out.println("Invalid input"); return; }
        N = sc.nextInt();
        if (!sc.hasNextInt()) { System.out.println("Invalid input"); return; }
        M = sc.nextInt();

        if (N < 1 || N > 10 || M < 0 || M > N*(N-1)/2) {
            System.out.println("Invalid input");
            return;
        }

        graph = new ArrayList<>();
        for (int i = 0; i < N; i++)
            graph.add(new ArrayList<>());

        for (int i = 0; i < M; i++) {
            if (!sc.hasNextInt()) { System.out.println("Invalid input"); return; }
            int A = sc.nextInt();
            if (!sc.hasNextInt()) { System.out.println("Invalid input"); return; }
            int B = sc.nextInt();

            if (A < 0 || A >= N || B < 0 || B >= N) {
                System.out.println("Invalid input");
                return;
            }

            graph.get(A).add(B);
            graph.get(B).add(A);
        }

        color = new int[N];
        boolean possible = true;

        for (int i = 0; i < N; i++) {
            if (color[i] == 0) {
                if (!dfs(i, 1)) {
                    possible = false;
                    break;
                }
            }
        }

        System.out.println(possible ? "Possible" : "Ghost trapped");
    }
}