#include <bits/stdc++.h>
using namespace std;
const int maxN = 1e5 + 100;
int n, x, y, a[10];
vector<int> dom[10][10], g[maxN], ans;
int tedad[10][10];
char ch[200];
void dfs(int v) {
  for (long long int i = 0; i <= (int)g[v].size() - 1; i++) {
    if (tedad[v][g[v][i]] > 0) {
      tedad[v][g[v][i]]--;
      tedad[g[v][i]][v]--;
      dfs(g[v][i]);
    }
  }
  ans.push_back(v);
}
void input() {
  cin >> n;
  for (long long int i = 1; i <= n; i++) {
    cin >> x >> y;
    tedad[x][y]++;
    tedad[y][x]++;
    dom[x][y].push_back(i);
    a[x]++;
    a[y]++;
    g[x].push_back(y);
    g[y].push_back(x);
  }
}
void show() {
  for (long long int i = 0; i <= ans.size() - 2; i++) {
    if (dom[ans[i]][ans[i + 1]].size()) {
      cout << dom[ans[i]][ans[i + 1]][dom[ans[i]][ans[i + 1]].size() - 1]
           << " +" << endl;
      dom[ans[i]][ans[i + 1]].pop_back();
    } else if (dom[ans[i + 1]][ans[i]].size()) {
      cout << dom[ans[i + 1]][ans[i]][dom[ans[i + 1]][ans[i]].size() - 1]
           << " -" << endl;
      dom[ans[i + 1]][ans[i]].pop_back();
    }
  }
}
int main() {
  ios::sync_with_stdio(false);
  input();
  int q = 0;
  x = -1;
  for (long long int i = 0; i <= 6; i++) {
    if (a[i] % 2) {
      x = i;
      q++;
    }
  }
  if (q != 0 && q != 2) {
    cout << "No solution";
    return 0;
  }
  if (x == -1) {
    for (long long int i = 0; i <= 6; i++)
      if (a[i]) x = i;
  }
  dfs(x);
  if (ans.size() != n + 1) {
    cout << "No solution";
    return 0;
  }
  show();
  return 0;
}
