#include <list>
#include <queue>
#include <iostream>
using namespace std;

struct Room {
   long room, dist;
   Room(long r, long d):room(r), dist(d) {} 
};

long dist, temp;
long l, m, n, p, q, x;
list<int> edges[5001];
queue<Room*> nextRoom;

int main (void) {
   cin >> n >> p >> x >> q;
   for (int i = 0; i < q; ++i) {
      cin >> l >> m;
      for (int j = 0; j < m; ++j) {
         cin >> temp;
         if (l + temp <= n) {
            edges[l].push_back(l + temp);
         }
         if (0 < l -temp) {
            edges[l].push_back(l - temp);
         }
      }
   }
   
   dist = 0;
   while (!edges[p].empty()) {
      nextRoom.push(new Room(edges[p].front(), dist + 1));
      edges[p].pop_front();
   }
   while ((p != x) && (!nextRoom.empty())) {
      p = nextRoom.front()->room;
      dist = nextRoom.front()->dist;
      delete(nextRoom.front());
      nextRoom.pop();
      while (!edges[p].empty()) {
         nextRoom.push(new Room(edges[p].front(), dist + 1));
         edges[p].pop_front();
      }
   }
   if (p == x) {
      cout << dist << endl;
   } else {
      cout << "Falta el postre" << endl;
   }

   return(0);
}

