#include <bits/stdc++.h>
using namespace std;
const long long N = 1000100;
vector<pair<long long, long long>> points;
bool isUsed[N];
long long ccw(pair<long long, long long> a, pair<long long, long long> b,
              pair<long long, long long> c) {
  return (b.first - a.first) * (c.second - a.second) -
         (b.second - a.second) * (c.first - a.first);
}
void solve() {
  long long n;
  cin >> n;
  for (long long i = 0; i < n; i++) {
    long long x, y;
    cin >> x >> y;
    points.push_back({x, y});
  }
  string s;
  cin >> s;
  pair<long long, long long> curP = {INT_MAX, INT_MAX};
  long long pivot = 0;
  for (long long i = 0; i < points.size(); i++) {
    if (points[i].second < curP.second) {
      curP = points[i];
      pivot = i;
    }
    if (points[i].second == curP.second) {
      if (points[i].first < curP.first) {
        curP = points[i];
        pivot = i;
      }
    }
  }
  isUsed[pivot] = true;
  for (long long i = 0; i < s.size(); i++) {
    cout << pivot + 1 << " ";
    long long middle = -1;
    if (s[i] == 'L') {
      for (long long j = 0; j < n; j++) {
        if (isUsed[j]) continue;
        if (middle == -1 || ccw(points[pivot], points[middle], points[j]) < 0) {
          middle = j;
        }
      }
    } else {
      for (long long j = 0; j < n; j++) {
        if (isUsed[j]) continue;
        if (middle == -1 || ccw(points[pivot], points[middle], points[j]) > 0) {
          middle = j;
        }
      }
    }
    pivot = middle;
    isUsed[pivot] = true;
  }
  cout << pivot + 1 << " ";
  for (long long i = 0; i < n; i++) {
    if (!isUsed[i]) {
      cout << i + 1 << endl;
    }
  }
}
int main() {
  solve();
  return 0;
}
