#include <bits/stdc++.h>
using namespace std;
int d[7][7];
vector<pair<int, int> > s;
int dfs(int v) {
  for (int i = 0; i < 7; i++) {
    if (d[v][i] > 0) {
      d[v][i]--;
      d[i][v]--;
      if (dfs(i) == 1) return 1;
      int l = i;
      if (s.size()) l = s.back().second;
      if (l != i) return 1;
      s.push_back(make_pair(i, v));
    }
  }
  return 0;
}
int main() {
  memset(d, 0, sizeof(d));
  int n;
  cin >> n;
  vector<pair<int, int> > a(n);
  vector<int> b(7);
  for (int i = 0; i < n; i++) {
    cin >> a[i].first >> a[i].second;
    d[a[i].first][a[i].second]++;
    d[a[i].second][a[i].first]++;
    b[a[i].first]++;
    b[a[i].second]++;
  }
  int f = 0;
  for (int i = 0; i < 7; i++)
    if (b[i] > 0) f = i;
  for (int i = 0; i < 7; i++)
    if (b[i] % 2 == 1) f = i;
  if (dfs(f) == 0 && s.size() == n) {
    for (int i = 0; i < n; i++)
      for (int j = 0; j < n; j++)
        if (s[i] == a[j]) {
          cout << j + 1 << " +\n";
          a[j] = make_pair(-1, -1);
          break;
        } else if (s[i].second == a[j].first && s[i].first == a[j].second) {
          cout << j + 1 << " -\n";
          a[j] = make_pair(-1, -1);
          break;
        }
  } else
    cout << "No solution";
  return 0;
}
