#include <bits/stdc++.h>
using namespace std;
bool dfs(int prev, vector<vector<int>>& map, vector<pair<int, int>>& result,
         int pos) {
  for (int i = 0; i < map.size(); i++) {
    if (map[prev][i] > 0) {
      map[prev][i]--;
      map[i][prev]--;
      if (!dfs(i, map, result, pos + 1)) {
        return false;
      }
      if (result.size() && result.back().second != i) {
        return false;
      }
      result.push_back(make_pair(i, prev));
    }
  }
  return true;
}
void output(const vector<pair<int, int>>& result,
            vector<pair<int, int>>& dominos) {
  for (const auto& bone : result) {
    for (int i = 0; i < dominos.size(); i++) {
      if (bone.first == dominos[i].first && bone.second == dominos[i].second) {
        cout << i + 1 << " +\n";
        dominos[i] = make_pair(-1, -1);
        break;
      }
      if (bone.first == dominos[i].second && bone.second == dominos[i].first) {
        cout << i + 1 << " -\n";
        dominos[i] = make_pair(-1, -1);
        break;
      }
    }
  }
}
int main() {
  vector<vector<int>> map(7, vector<int>(7));
  vector<pair<int, int>> dominos;
  vector<int> count(7, 0);
  int n;
  cin >> n;
  dominos.resize(n, pair<int, int>(0, 0));
  for (auto& domino : dominos) {
    cin >> domino.first;
    cin >> domino.second;
    map[domino.first][domino.second]++;
    map[domino.second][domino.first]++;
    count[domino.first]++;
    count[domino.second]++;
  }
  vector<pair<int, int>> result;
  int first = dominos[0].first;
  for (int i = 0; i < count.size(); i++) {
    if (count[i] % 2) {
      first = i;
      break;
    }
  }
  if (dfs(first, map, result, 0) && result.size() == n) {
    output(result, dominos);
  } else {
    cout << "No solution\n";
  }
  return 0;
}
