#include <bits/stdc++.h>
using namespace std;
int a[101][2];
int b[7];
int p[101][2];
bool v[101];
bool flag;
int n;
void dfs(int dep, int x, int y) {
  if (flag) return;
  v[x] = 1;
  p[dep][0] = x;
  p[dep][1] = y;
  if (dep == n) {
    flag = 1;
    return;
  }
  for (int i = 1; i <= n; i++) {
    if (!v[i]) {
      if (a[x][1 - y] == a[i][0])
        dfs(dep + 1, i, 0);
      else if (a[x][1 - y] == a[i][1])
        dfs(dep + 1, i, 1);
    }
  }
  v[x] = 0;
}
int main() {
  int i;
  cin >> n;
  for (i = 1; i <= n; i++) {
    scanf("%d%d", &a[i][0], &a[i][1]);
    b[a[i][0]]++;
    b[a[i][1]]++;
  }
  int qd = 0;
  for (i = 0; i <= 6; i++)
    if (b[i] % 2 == 1) qd++;
  if (qd != 0 && qd != 2)
    cout << "No solution" << endl;
  else {
    memset(v, 0, sizeof(v));
    flag = 0;
    if (qd == 0)
      dfs(1, 1, 0);
    else {
      for (i = 1; i <= n; i++)
        if (b[a[i][0]] % 2 == 1) {
          dfs(1, i, 0);
          break;
        } else if (b[a[i][1]] % 2 == 1) {
          dfs(1, i, 1);
          break;
        }
    }
    if (!flag)
      puts("No solution");
    else {
      for (i = 1; i <= n; i++) {
        printf("%d ", p[i][0]);
        if (p[i][1] == 0)
          cout << "+";
        else
          cout << "-";
        cout << endl;
      }
    }
  }
  return 0;
}
