#include <bits/stdc++.h>
using namespace std;
const int maxn = 1000 * 1000 + 10;
const int maxn5 = 5 * 1000 * 100 + 10;
const int maxn3 = 1000 + 10;
const long long mod = 1000 * 1000 * 1000 + 7;
const long long inf = 1LL * 2 * 1000 * 1000 * 1000 * 1000 * 1000 * 1000 + 10;
bool mark[maxn5], seen[10];
vector<int> adj[10], ind[10];
map<int, pair<int, int>> m;
int pt[10];
void dfs(int v) {
  seen[v] = true;
  for (auto u : adj[v])
    if (!seen[u]) dfs(u);
  return;
}
void tour(int v) {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  while (pt[v] < adj[v].size()) {
    if (!mark[ind[v][pt[v]]]) {
      mark[ind[v][pt[v]]] = true;
      int a = ind[v][pt[v]];
      tour(adj[v][pt[v]]);
      cout << a << ' ' << (m[a].first == v ? '-' : '+') << '\n';
    }
    pt[v]++;
  }
  return;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    int a, b;
    cin >> a >> b;
    m[i + 1] = {a, b};
    adj[a].push_back(b), adj[b].push_back(a);
    ind[a].push_back(i + 1), ind[b].push_back(i + 1);
  }
  int cnt = 0, v = 0;
  for (int i = 0; i < 7; i++)
    if (adj[i].size() % 2 == 1) cnt++, v = i;
  if (cnt > 2) return cout << "No solution\n", 0;
  if (cnt == 0)
    for (int i = 0; i < 7; i++)
      if (adj[i].size() > 0) v = i;
  dfs(v);
  for (int i = 0; i < 7; i++)
    if (!seen[i] and adj[i].size() > 0) return cout << "No solution\n", 0;
  tour(v);
  return 0;
}
