#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:16777216")
using namespace std;
const long double PI = acos(-1.0);
const double eps = 1e-12;
const int INF = 2147483647;
const long long LLINF = 9223372036854775807LL;
int matrix[111][111];
pair<int, int> p[111];
int degrees[111];
vector<int> answer;
char visited[111];
int n, a, b, startVertex;
void dfs(int vertex) {
  for (int i = 0; i < 7; i++) {
    if (matrix[vertex][i]) {
      matrix[vertex][i]--;
      matrix[i][vertex]--;
      degrees[vertex]--;
      degrees[i]--;
      dfs(i);
    }
  }
  answer.push_back(vertex);
}
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d%d", &p[i].first, &p[i].second);
    matrix[p[i].first][p[i].second]++;
    matrix[p[i].second][p[i].first]++;
    degrees[p[i].first]++;
    degrees[p[i].second]++;
  }
  int odd = 0;
  for (int i = 0; i < 7; i++) {
    if (degrees[i] % 2) {
      odd++;
    }
  }
  if (odd > 2) {
    printf("No solution");
    return 0;
  }
  for (int i = 0; i < 7; i++) {
    if (odd) {
      if (degrees[i] % 2) {
        dfs(i);
        break;
      }
    } else {
      if (degrees[i]) {
        dfs(i);
        break;
      }
    }
  }
  if ((int)answer.size() != n + 1) {
    printf("No solution");
    return 0;
  }
  for (int i = 0; i < (int)answer.size(); i++) {
    fprintf(stderr, "%d ", answer[i]);
  }
  for (int i = 0; i < (int)answer.size() - 1; i++) {
    int a = answer[i];
    int b = answer[i + 1];
    for (int j = 0; j < n; j++) {
      if (!visited[j]) {
        if (a == p[j].first && b == p[j].second) {
          printf("%d +\n", j + 1);
          visited[j] = true;
          break;
        }
        if (b == p[j].first && a == p[j].second) {
          printf("%d -\n", j + 1);
          visited[j] = true;
          break;
        }
      }
    }
  }
  return 0;
}
