#include <bits/stdc++.h>
using namespace std;
const int o = 7;
int n, a[o], x, y, m, b[o][o];
vector<int> p;
vector<pair<int, int> > d;
vector<pair<pair<int, bool>, pair<int, pair<int, int> > > > edg[o];
bool mark[o];
void dfs(int v) {
  mark[v] = true;
  for (int i = 0; i < edg[v].size(); i++) {
    if (!mark[edg[v][i].first.first] && !edg[v][i].first.second) {
      dfs(edg[v][i].first.first);
    }
  }
}
bool check(int v, int u) {
  if (b[v][u] > 1 || v == u) {
    return false;
  }
  for (int i = 0; i < o; i++) {
    mark[i] = false;
  }
  mark[v] = true;
  for (int i = 0; i < edg[v].size(); i++) {
    if (edg[v][i].first.first != u && edg[v][i].first.first != v &&
        !mark[edg[v][i].first.first] && !edg[v][i].first.second) {
      dfs(edg[v][i].first.first);
    }
  }
  if (mark[u]) {
    return false;
  }
  return true;
}
void DO(int x, int c) {
  for (int i = 0; i < edg[x].size(); i++) {
    if (!(a[edg[x][i].first.first] % 2) && (c < n) &&
        !(edg[x][i].first.second) && !(check(x, edg[x][i].first.first))) {
      d.push_back(
          make_pair(edg[x][i].second.first, edg[x][i].second.second.first));
      edg[x][i].first.second =
          edg[edg[x][i].first.first][edg[x][i].second.second.second]
              .first.second = true;
      b[x][edg[x][i].first.first]--;
      b[edg[x][i].first.first][x]--;
      DO(edg[x][i].first.first, c + 1);
    } else if (!(edg[x][i].first.second) && (c < n) &&
               !(check(x, edg[x][i].first.first))) {
      d.push_back(
          make_pair(edg[x][i].second.first, edg[x][i].second.second.first));
      edg[x][i].first.second =
          edg[edg[x][i].first.first][edg[x][i].second.second.second]
              .first.second = true;
      b[x][edg[x][i].first.first]--;
      b[edg[x][i].first.first][x]--;
      DO(edg[x][i].first.first, c + 1);
    } else if (!(edg[x][i].first.second) && (c == n)) {
      d.push_back(
          make_pair(edg[x][i].second.first, edg[x][i].second.second.first));
    } else if (i == edg[x].size() - 1) {
      for (int j = 0; j < edg[x].size(); j++) {
        if ((c < n) && !(edg[x][j].first.second)) {
          d.push_back(
              make_pair(edg[x][j].second.first, edg[x][j].second.second.first));
          edg[x][j].first.second =
              edg[edg[x][j].first.first][edg[x][j].second.second.second]
                  .first.second = true;
          b[x][edg[x][j].first.first]--;
          b[edg[x][j].first.first][x]--;
          DO(edg[x][j].first.first, c + 1);
        }
      }
    }
  }
}
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> x >> y;
    b[x][y]++;
    b[y][x]++;
    if (x != y) {
      edg[x].push_back(make_pair(make_pair(y, false),
                                 make_pair(i, make_pair(0, edg[y].size()))));
      edg[y].push_back(make_pair(
          make_pair(x, false), make_pair(i, make_pair(1, edg[x].size() - 1))));
    } else {
      edg[x].push_back(make_pair(make_pair(x, false),
                                 make_pair(i, make_pair(0, edg[x].size()))));
    }
    a[y]++;
    a[x]++;
  }
  for (int i = 0; i < o; i++) {
    if (a[i] % 2) {
      p.push_back(i);
    }
  }
  if (p.size() && p.size() != 2) {
    cout << "No solution" << endl;
    return 0;
  }
  for (int i = 0; i < o; i++) {
    if (!mark[i] && a[i]) {
      dfs(i);
      m++;
    }
  }
  if (m != 1) {
    cout << "No solution" << endl;
    return 0;
  }
  if (p.size()) {
    a[p[0]]--;
    DO(p[0], 1);
  } else {
    for (int i = 0; i < o; i++) {
      if (a[i]) {
        DO(i, 1);
        break;
      }
    }
  }
  for (int i = 0; i < n; i++) {
    if (!d[i].second) {
      cout << d[i].first << " + " << endl;
    } else {
      cout << d[i].first << " - " << endl;
    }
  }
  return 0;
}
