#include <bits/stdc++.h>
using namespace std;
#pragma comment(linker, "/STACK:50000000")
string problem_name = "a";
void init() { freopen((problem_name + ".in").c_str(), "rt", stdin); }
int da[111], db[111];
int p[7];
int u[111];
int mas[7][7];
vector<int> res;
int n;
int go(int v, int pr) {
  for (int i = 0; i <= 6; i++)
    if (mas[v][i]) {
      mas[v][i]--;
      mas[i][v]--;
      go(i, v);
    }
  if (pr != -1)
    for (int i = 1; i <= n; i++)
      if (!u[i]) {
        if (da[i] == v && db[i] == pr) {
          res.push_back(i);
          u[i] = 1;
          break;
        } else if (da[i] == pr && db[i] == v) {
          res.push_back(-i);
          u[i] = 1;
          break;
        }
      }
  return 0;
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d %d", &da[i], &db[i]);
    mas[da[i]][db[i]]++;
    mas[db[i]][da[i]]++;
    p[da[i]]++;
    p[db[i]]++;
  }
  int col = 0;
  for (int i = 0; i < 7; i++)
    if (p[i] % 2) col++;
  if (col > 2) {
    printf("No solution");
    return 0;
  }
  if (col == 2) {
    for (int i = 0; i < 7; i++)
      if (p[i] % 2) {
        res.clear();
        memset(u, 0, sizeof(u));
        go(i, -1);
        if (int((res).size()) != n)
          printf("No solution");
        else
          for (int i = 0; i < n; i++)
            if (res[i] > 0)
              printf("%d +\n", abs(res[i]));
            else
              printf("%d -\n", abs(res[i]));
        return 0;
      }
  }
  for (int i = 0; i < 7; i++) {
    res.clear();
    memset(u, 0, sizeof(u));
    go(i, -1);
    if (int((res).size()) == n) {
      for (int i = 0; i < n; i++)
        if (res[i] >= 0)
          printf("%d +\n", abs(res[i]));
        else
          printf("%d -\n", abs(res[i]));
      return 0;
    }
  }
  printf("No solution");
  return 0;
}
