#include <bits/stdc++.h>
using namespace std;
struct EDGE {
  int ind, a, b, nxt;
  char inv;
};
int n, idx, head[102], ind[7], hv[7];
bool vi[102];
EDGE ed[203];
void addedge(int a, int b, int ind, char inv) {
  ed[idx].a = a;
  ed[idx].b = b;
  ed[idx].ind = ind;
  ed[idx].inv = inv;
  ed[idx].nxt = head[a];
  head[a] = idx++;
}
int find(int x) {
  queue<int> q;
  bool v[7] = {0};
  int nxt, p, hv = 1;
  q.push(x);
  v[x] = 1;
  while (!q.empty()) {
    nxt = q.front();
    q.pop();
    for (p = head[nxt]; p != -1; p = ed[p].nxt) {
      if (!v[ed[p].b]) {
        ++hv;
        v[ed[p].b] = 1;
        q.push(ed[p].b);
      }
    }
  }
  return hv;
}
void FindPath(int s, int e, list<int>::iterator it, list<int> &li) {
  int p;
  for (p = head[s]; p != -1; p = ed[p].nxt) {
    if (!vi[ed[p].ind]) {
      vi[ed[p].ind] = 1;
      ++it;
      it = li.insert(it, p);
      s = ed[p].b;
      ++hv[ed[p].b];
      ++hv[ed[p].a];
      break;
    }
  }
  while (s != e) {
    for (p = head[s]; p != -1; p = ed[p].nxt) {
      if (!vi[ed[p].ind]) {
        vi[ed[p].ind] = 1;
        ++it;
        it = li.insert(it, p);
        s = ed[p].b;
        ++hv[ed[p].b];
        ++hv[ed[p].a];
        break;
      }
    }
  }
}
int main(int argc, char *argv[]) {
  scanf("%d", &n);
  int a, b, i, k;
  idx = 0;
  memset(vi, 0, sizeof(vi));
  memset(ind, 0, sizeof(ind));
  memset(hv, 0, sizeof(hv));
  memset(head, -1, sizeof(head));
  bool t[7] = {0};
  for (k = 0, i = 0; i < n; ++i) {
    scanf("%d%d", &a, &b);
    addedge(a, b, i, '+');
    addedge(b, a, i, '-');
    ++ind[a];
    ++ind[b];
    t[a] = 1;
    t[b] = 1;
  }
  k = 0;
  for (i = 0; i < 7; ++i) {
    if (t[i]) ++k;
  }
  if (find(a) < k) {
    puts("No solution");
    return 0;
  }
  k = 0;
  for (i = 0; i < 7; ++i) {
    if (ind[i] & 1) ++k;
  }
  if ((k != 0) && (k != 2)) {
    puts("No solution");
    return 0;
  }
  int s, e;
  if (k == 0) {
    s = ed[0].a, e = ed[0].a;
  } else {
    for (i = 0; i < 7; ++i) {
      if (ind[i] & 1) {
        s = i;
        break;
      }
    }
    for (++i; i < 7; ++i) {
      if (ind[i] & 1) {
        e = i;
        break;
      }
    }
  }
  list<int> li;
  FindPath(s, e, li.begin(), li);
  list<int>::iterator it;
  int p;
  while (hv[s] < ind[s]) {
    for (p = head[s]; p != -1; p = ed[p].nxt) {
      if (!vi[ed[p].ind]) {
        vi[ed[p].ind] = 1;
        li.push_front(p);
        ++hv[ed[p].b];
        ++hv[ed[p].a];
        FindPath(ed[p].b, s, li.begin(), li);
        break;
      }
    }
  }
  while (li.size() < n) {
    for (it = li.begin(); it != li.end(); ++it) {
      if (hv[ed[*it].b] < ind[ed[*it].b]) {
        FindPath(ed[*it].b, ed[*it].b, it, li);
      }
    }
  }
  for (it = li.begin(); it != li.end(); ++it) {
    printf("%d %c\n", ed[*it].ind + 1, ed[*it].inv);
  }
  return 0;
}
