#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline void checkMax(T& a, const T& b) {
  if (a < b) a = b;
}
template <typename T>
inline void checkMin(T& a, const T& b) {
  if (a > b) a = b;
}
template <typename T>
struct LinkedEdge {
  T data;
  int dest;
  LinkedEdge<T>* next;
};
template <int kMaxNode, int kMaxEdge, typename T>
struct EdgeList {
  LinkedEdge<T>* head[kMaxNode];
  LinkedEdge<T> edges[kMaxEdge];
  int cnt_edge, num_node;
  void init(int _num_node) {
    num_node = _num_node;
    std::fill(head, head + num_node, (LinkedEdge<T>*)0);
    cnt_edge = 0;
  }
  LinkedEdge<T>* add_edge(int x, int y, const T& data) {
    edges[cnt_edge].data = data;
    edges[cnt_edge].dest = y;
    edges[cnt_edge].next = head[x];
    head[x] = edges + cnt_edge;
    ++cnt_edge;
    return edges + cnt_edge - 1;
  }
};
const int kMaxN = 100 + 10;
const int kMaxNode = 7;
char direction[kMaxN];
int deg[kMaxNode];
int n;
vector<int> order;
EdgeList<kMaxNode, kMaxN + kMaxN, int> elist;
void get_euler(int v) {
  for (__typeof__(elist.head[0]) e = elist.head[v]; e != 0; e = e->next) {
    if (direction[e->data >> 1] != '.') continue;
    direction[e->data >> 1] = (e->data & 1) ? '-' : '+';
    --deg[v];
    --deg[e->dest];
    get_euler(e->dest);
    order.push_back(e->data >> 1);
  }
}
int main() {
  elist.init(kMaxNode);
  scanf("%d", &n);
  int a, b;
  fill(deg, deg + kMaxNode, 0);
  for (int n___LINE__ = (n), i = 0; i < n___LINE__; ++i) {
    scanf("%d%d", &a, &b);
    direction[i] = '.';
    deg[a]++, deg[b]++;
    elist.add_edge(a, b, i << 1);
    elist.add_edge(b, a, (i << 1) | 1);
  }
  int cnt_odd = 0;
  for (int n___LINE__ = (kMaxNode), i = 0; i < n___LINE__; ++i) {
    if (deg[i] & 1) {
      ++cnt_odd;
    }
  }
  if (cnt_odd > 2) {
    puts("No solution");
  } else {
    int start_node = -1, cnt_comp = 0;
    for (int n___LINE__ = (kMaxNode), i = 0; i < n___LINE__; ++i) {
      if (deg[i] > 0 && (start_node < 0 || (deg[i] & 1))) {
        start_node = i;
      }
    }
    order.clear();
    get_euler(start_node);
    if (((int)(order).size()) != n) {
      puts("No solution");
    } else {
      for (int n___LINE__ = (n), i = 0; i < n___LINE__; ++i) {
        printf("%d %c\n", order[n - i - 1] + 1, direction[order[n - i - 1]]);
      }
    }
  }
  return 0;
}
