#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <climits>
#include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#include <map>
#include <queue>
#include <deque>
#include <stack>
#include <set>
//~ using namespace std;
typedef long double num;
typedef long long int lint;
typedef struct { int x, y; } intpoint;
typedef struct { num x, y; } numpoint;
typedef struct { lint x, y; } lintpoint;
#define EPS (1e-7L)
#define PI (4.0L * atanl(1.0L))
#define min(a, b) ((a) < (b) ? (a) : (b))
#define max(a, b) ((a) > (b) ? (a) : (b))
#define abs(a) ((a) < 0 ? -(a) : (a))
int main(int argc, char *argv[]) {
while (true) {
int ants, len;
bool existL = false, existR = false, collision;
if (2 != scanf("%u %u\n", &len, &ants))
break;
int maxL = 0, minR = len, mindist = len;
std::vector<int> antssssss;
bool hasR = false, hasL = false;
int startR = INT_MAX, startL = 0;
for (int ant = 0; ant < ants; ant++) {
int start;
char dir;
scanf("%u %c\n", &start, &dir);
if (dir == 'L' && startL <= start) {
existL = true;
maxL = max(maxL, start);
hasL = true;
startL = start;
} else if (dir == 'R' && start <= startR) {
existR = true;
minR = min(minR, start);
hasR = true;
startR = start;
}
int aux = len%2 ? min(abs(len/2 - start), abs(len/2 + 1 - start)) : abs((len >>1) - start);
if (aux < mindist)
{
antssssss.clear();
antssssss.push_back(start);
mindist = aux;
}
else
if(aux == mindist)
antssssss.push_back(start);
}
int L = startL, R = len - startR;
if (existL && existR) {
if (minR < maxL) {
if(antssssss.size() == 2)
printf("The last ant will fall down in %d seconds - started at %d and %d.\n", max(L, R), antssssss[0], antssssss[1]);
else
printf("The last ant will fall down in %d seconds - started at %d.\n", max(L, R), antssssss[0]);
}
} else if (existR) {
printf("The last ant will fall down in %d seconds - started at %d.\n", R, startR);
} else if (existL) {
printf("The last ant will fall down in %d seconds - started at %d.\n", L, startL);
} else {
// not gonna happen
}
}
return 0;
}