#include <bits/stdc++.h>
using namespace std;
struct Info {
  int Number;
  bool Flag;
};
struct Edge {
  int Data, Number;
};
vector<Info> Map[7][7];
vector<Edge> G[7];
bool Flag[100];
vector<int> List;
void DFS(int V) {
  for (int i = 0; i < G[V].size(); i++)
    if (!Flag[G[V][i].Number]) {
      Flag[G[V][i].Number] = true;
      DFS(G[V][i].Data);
    }
  List.push_back(V);
}
int main() {
  int M;
  scanf("%d", &M);
  static int Degree[7];
  memset(Degree, 0, sizeof(Degree));
  static bool Go[7][7];
  for (int i = 0; i <= 6; i++)
    for (int j = 0; j <= 6; j++) Go[i][j] = (i == j);
  for (int i = 0; i < M; i++) {
    int X, Y;
    scanf("%d%d", &X, &Y);
    Map[X][Y].push_back((Info){i, true});
    Map[Y][X].push_back((Info){i, false});
    G[X].push_back((Edge){Y, i});
    G[Y].push_back((Edge){X, i});
    Degree[X]++;
    Degree[Y]++;
    Go[X][Y] = Go[Y][X] = true;
  }
  int Count = 0;
  for (int i = 0; i <= 6; i++) Count += Degree[i] & 1;
  if (Count > 2) {
    printf("No solution\n");
    return 0;
  }
  for (int k = 0; k <= 6; k++)
    for (int i = 0; i <= 6; i++)
      for (int j = 0; j <= 6; j++)
        Go[i][j] = Go[i][j] || (Go[i][k] && Go[k][j]);
  for (int i = 0; i <= 6; i++)
    for (int j = 0; j <= 6; j++)
      if (Degree[i] && Degree[j] && !Go[i][j]) {
        printf("No solution\n");
        return 0;
      }
  int V = -1;
  for (int i = 0; i <= 6; i++) {
    if (Degree[i]) V = i;
    if (Degree[i] & 1) break;
  }
  memset(Flag, 0, sizeof(Flag));
  DFS(V);
  memset(Flag, 0, sizeof(Flag));
  for (int i = 1; i < List.size(); i++) {
    int X = List[i - 1], Y = List[i];
    for (int j = 0; j < Map[X][Y].size(); j++) {
      int V = Map[X][Y][j].Number;
      if (Flag[V]) continue;
      Flag[V] = true;
      printf("%d ", V + 1);
      putchar(Map[X][Y][j].Flag ? '+' : '-');
      putchar('\n');
      break;
    }
  }
  return 0;
}
