import java.io.*;
import java.util.*;
public class Main {
public static void main(String[] args) throws IOException{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
boolean answer = true;
int n = Integer.parseInt(br.readLine());
ArrayList<String[]> list = new ArrayList<>();
int birdlength = 0;
for (int i = 0; i < n; i++) {
String[] temp = br.readLine().split(" ");
birdlength += temp.length;
list.add(temp);
}
ArrayList<String> word = new ArrayList<>(Arrays.asList(br.readLine().split(" ")));
boolean[] check = new boolean[word.size()];
if (word.size() != birdlength) {
answer = false;
} else {
for (int i = 0; i < n; i++) {
String[] compare = list.get(i);
int start = -1;
for (int j = 0; j < compare.length; j++) {
int index = word.indexOf(compare[j]);
if (start > index || index == -1) continue;
start = index;
check[index] = true;
}
}
for (int i = 0; i < check.length; i++) {
if (!check[i]) {
answer = false;
break;
}
}
}
System.out.println(answer ? "Possible" : "Impossible");
}
}
ArrayList word = new ArrayList<>(Arrays.asList(br.readLine().split(" ")));
String 배열에서 바로 ArrayList로 변환하는 방법