#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
void init_ios() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
}
const long long N = 2003;
long long n, sta;
string s;
pair<long long, long long> a[N];
vector<long long> nr;
pair<long long, long long> operator-(pair<long long, long long> x,
                                     pair<long long, long long> y) {
  return {x.first - y.first, x.second - y.second};
}
long long det(pair<long long, long long> x, pair<long long, long long> y) {
  return x.first * y.second - x.second * y.first;
}
signed main() {
  init_ios();
  cin >> n;
  for (long long i = 1; i <= n; ++i) {
    cin >> a[i].first >> a[i].second;
    if (i == 1 || a[i] < a[sta]) sta = i;
  }
  cin >> s;
  for (long long i = 1; i <= n; ++i)
    if (i != sta) nr.push_back(i);
  cout << sta << " ";
  for (long long i = 0; i < s.size(); ++i) {
    long long kto = nr[0];
    long long coto = 0;
    if (s[i] == 'L') {
      for (long long j = 1; j < nr.size(); ++j)
        if (det(a[kto] - a[sta], a[nr[j]] - a[sta]) < 0) {
          kto = nr[j];
          coto = j;
        }
    } else {
      for (long long j = 1; j < nr.size(); ++j)
        if (det(a[kto] - a[sta], a[nr[j]] - a[sta]) > 0) {
          kto = nr[j];
          coto = j;
        }
    }
    cout << kto << " ";
    swap(nr[coto], nr.back());
    nr.pop_back();
    sta = kto;
  }
  cout << nr[0] << "\n";
}
