#include <bits/stdc++.h>
using namespace std;
const int N = 2200;
int x[N], y[N], vis[N];
char a[N];
long long vec(int i, int j, int k) {
  long long x1 = x[j] - x[i], x2 = x[k] - x[i];
  long long y1 = y[j] - y[i], y2 = y[k] - y[i];
  return x1 * y2 - x2 * y1;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> x[i] >> y[i];
  cin >> a;
  int now = 1;
  for (int i = 1; i <= n; i++) {
    if (x[i] < x[now])
      now = i;
    else if (x[i] == x[now] && y[i] < y[now])
      now = i;
  }
  vis[now] = 1;
  cout << now << endl;
  for (int i = 0; i < n - 2; i++) {
    if (a[i] == 'L') {
      int cur = -1;
      for (int j = 1; j <= n; j++) {
        if (vis[j]) continue;
        if (cur == -1) {
          cur = j;
          continue;
        }
        if (vec(now, j, cur) > 0) {
          cur = j;
        }
      }
      vis[cur] = 1;
      now = cur;
      cout << now << endl;
    } else {
      int cur = -1;
      for (int j = 1; j <= n; j++) {
        if (vis[j]) continue;
        if (cur == -1) {
          cur = j;
          continue;
        }
        if (vec(now, j, cur) < 0) {
          cur = j;
        }
      }
      vis[cur] = 1;
      now = cur;
      cout << now << endl;
    }
  }
  for (int i = 1; i <= n; i++)
    if (!vis[i]) cout << i << endl;
  return 0;
}
