#include <bits/stdc++.h>
using namespace std;
const int maxN = 1000 + 20;
int n, m, pt[maxN];
vector<pair<int, int> > adj[maxN];
vector<pair<int, int> > edge;
bool mark[maxN];
vector<pair<int, int> > ans;
vector<int> odd;
void Euler(int v) {
  while (pt[v] < adj[v].size()) {
    int e = adj[v][pt[v]].second;
    int u = adj[v][pt[v]].first;
    if (!mark[e]) {
      mark[e] = true;
      Euler(u);
      ans.push_back(make_pair(u, v));
    }
    pt[v]++;
  }
}
int main() {
  cin >> n;
  int k;
  for (int i = 0; i < n; i++) {
    int x, y;
    cin >> x >> y;
    adj[x].push_back(make_pair(y, i));
    adj[y].push_back(make_pair(x, i));
    k = x;
    edge.push_back(make_pair(x, y));
  }
  int t = 1, x, y;
  for (int i = 0; i <= 6; i++) {
    if (adj[i].size() % 2 == 1) odd.push_back(i);
  }
  if (odd.size() == 0)
    Euler(k);
  else if (odd.size() == 2)
    Euler(odd[0]);
  else {
    cout << "No solution";
    return 0;
  }
  for (int i = 0; i < n; i++) {
    if (mark[i] == 0) {
      cout << "No solution";
      return 0;
    }
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      if ((ans[i].first == edge[j].first && ans[i].second == edge[j].second) &&
          mark[j] == 1) {
        mark[j] = false;
        cout << j + 1 << " +" << endl;
        break;
      } else if ((ans[i].second == edge[j].first &&
                  ans[i].first == edge[j].second) &&
                 mark[j] == 1) {
        mark[j] = false;
        cout << j + 1 << " -" << endl;
        break;
      }
    }
  }
  return 0;
}
