#include <bits/stdc++.h>
using namespace std;
const int MAXN = 105;
int N, cnt = 0, tmp = 0, pos = -1, ans_tot = 0;
int fa[10], num[10], ans[MAXN], head[MAXN];
struct node {
  int to, nxt;
  bool flag;
  int vis, id;
} edge[MAXN << 1];
void add(int u, int v, bool flag, int id) {
  edge[cnt].to = v;
  edge[cnt].nxt = head[u];
  edge[cnt].flag = flag;
  edge[cnt].id = id;
  head[u] = cnt++;
}
void init() {
  memset(head, -1, sizeof(head));
  for (int i = 0; i <= 6; i++) fa[i] = i;
}
int find(int u) {
  if (fa[u] != u) fa[u] = find(fa[u]);
  return fa[u];
}
bool check_1() {
  for (int i = 0; i <= 6; i++)
    if (num[i] & 1) tmp++;
  if (tmp == 0 || tmp == 2) return false;
  return true;
}
bool check_2() {
  for (int i = 0; i <= 6; i++) {
    if (pos == -1 && num[i])
      pos = i;
    else if (num[i]) {
      int fu = find(pos);
      int fv = find(i);
      if (fu != fv) return true;
    }
  }
  return false;
}
void dfs(int u) {
  for (int i = head[u]; i != -1; i = edge[i].nxt) {
    if (edge[i].vis) continue;
    edge[i].vis = edge[i ^ 1].vis = 1;
    dfs(edge[i].to);
    ans[++ans_tot] = i;
  }
}
int main() {
  scanf("%d", &N);
  init();
  for (int i = 1, u, v; i <= N; i++) {
    scanf("%d%d", &u, &v);
    num[u]++;
    num[v]++;
    add(u, v, 0, i);
    add(v, u, 1, i);
    int fu = find(u);
    int fv = find(v);
    if (fu != fv) fa[fu] = fv;
  }
  if (check_1() || check_2()) {
    printf("No solution");
  } else {
    if (!tmp)
      dfs(pos);
    else {
      for (int i = 0; i <= 6; i++)
        if (num[i] & 1) {
          dfs(i);
          break;
        }
    }
    for (int i = 1; i <= N; i++) {
      printf("%d ", edge[ans[i]].id);
      if (edge[ans[i]].flag)
        printf("+\n");
      else
        printf("-\n");
    }
  }
  return 0;
}
