#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
template <class c>
struct rge {
  c b, e;
};
template <class c>
rge<c> range(c i, c j) {
  return rge<c>{i, j};
}
template <class c>
auto dud(c* x) -> decltype(cerr << *x, 0);
template <class c>
char dud(...);
struct debug {
  template <class c>
  debug& operator<<(const c&) {
    return *this;
  }
};
struct P {
  long long x, y;
  int id;
  P operator-(const P& he) const { return P{x - he.x, y - he.y, id}; }
  long long operator*(const P& he) const { return x * he.y - y * he.x; }
  void read() { cin >> x >> y; }
};
vector<P> get_hull(vector<P> w) {
  assert((int)w.size() >= 3);
  vector<P> hull;
  for (int rep = 0; rep < 2; ++rep) {
    int S = hull.size();
    for (P C : w) {
      while ((int)hull.size() >= S + 2) {
        P A = hull.end()[-2];
        P B = hull.back();
        if ((B - A) * (C - B) < 0) {
          break;
        }
        hull.pop_back();
      }
      hull.push_back(C);
    }
    hull.pop_back();
  }
  return hull;
};
int main() {
  int n;
  cin >> n;
  vector<P> w(n);
  for (int i = 0; i < n; ++i) {
    w[i].read();
    w[i].id = i + 1;
  }
  sort(w.begin(), w.end(), [&](const P& a, const P& b) {
    return make_pair(a.x, a.y) < make_pair(b.x, b.y);
  });
  string s;
  cin >> s;
  P a = w[0];
  printf("%d ", a.id);
  w.erase(w.begin());
  for (int ii = 0; ii < (int)s.size(); ++ii) {
    P best{-1, -1, -1};
    for (int i = 0; i < (int)w.size(); ++i) {
      if (w[i].id == a.id) {
        continue;
      }
      P maybe = w[i];
      if (best.id == -1) {
        best = maybe;
      } else {
        if ((s[ii] == 'R') == ((maybe - a) * (best - a) < 0)) {
          best = maybe;
        }
      }
    }
    printf("%d ", best.id);
    for (int i = 0; i < (int)w.size(); ++i) {
      if (w[i].id == best.id) {
        w.erase(w.begin() + i);
      }
    }
    a = best;
  }
  assert((int)w.size() == 1);
  printf("%d\n", w[0].id);
}
