#include <iostream>
#include <vector>
#include <queue>
#include <cstring>

using namespace std;

vector<int> adj[50000];
vector<int> adj2[50000];
bool visited[50000];
int color[50000];
bool dead[50000];
bool dfs(int i) {
	if (color[i] == 1) return false;
	if (color[i] == 2) return true;
	color[i] = 1;
	for (int j = 0; j < adj[i].size(); j++) {
		if (!dfs(adj[i][j])) return false;
	}
	color[i] = 2;
	return true;
}
int main() {
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	int n; cin >> n;
	for (int i = 0; i+1 < n; i++) {
		int m; cin >> m;
		for (int k = 0; k < m; k++) {
			int j; cin >> j; j--;
			adj[i].push_back(j);
			adj2[j].push_back(i);
		}
	}
	bool reachable = false;
	bool deadreachable = false;
	memset(color, 0, sizeof color);
	bool limited = dfs(0);
	memset(visited, 0, sizeof visited);
	queue<int> q;
	memset(dead, 1, sizeof dead);
	q.push(n-1);
	while (!q.empty()) {
		int curr = q.front();
		q.pop();
		if (visited[curr]) continue;
		visited[curr] = true;
		dead[curr] = false;
		for (int i = 0; i < adj2[curr].size(); i++) {
			q.push(adj2[curr][i]);
		}
	}
	memset(visited, 0, sizeof visited);
	q.push(0);
	while (!q.empty()) {
		int curr = q.front();
		q.pop();
		if (visited[curr]) continue;
		visited[curr] = true;
		if (curr == n-1) {
			reachable = true;
		} else if (dead[curr]) {
			deadreachable = true;
		}
		for (int i = 0; i < adj[curr].size(); i++) {
			q.push(adj[curr][i]);
		}
	}
	if (reachable && !deadreachable) {
		cout << "PARDON ";
	} else {
		cout << "PRISON ";
	}
	if (limited) {
		cout << "LIMITED" << endl;
	} else {
		cout << "UNLIMITED" << endl;
	}
}