#include <bits/stdc++.h>
using namespace std;
const int N = 110;
struct Edge {
  int u, v;
  Edge(int u = 0, int v = 0) : u(u), v(v) {}
  int to(int x) {
    if (u == x) return v;
    return u;
  }
} E[N];
vector<int> con[N];
vector<pair<int, int>> ans[10];
pair<int, int> pos[N];
int vis[N], visT;
int dfs(int u) {
  vis[u] = visT;
  int res = con[u].size() % 2;
  for (int e : con[u]) {
    int v = E[e].to(u);
    if (!vis[v]) res += dfs(v);
  }
  return res;
}
void dfs1(int u, int id) {
  for (int e : con[u])
    if (!vis[e]) {
      int v = E[e].to(u);
      vis[e] = 1;
      dfs1(v, id);
      ans[id].emplace_back(e, E[e].u == v);
    }
}
int main() {
  ios_base::sync_with_stdio(0);
  int n, nn;
  cin >> n;
  nn = n;
  for (int i = 1; i <= n; i++) {
    cin >> E[i].u >> E[i].v;
    E[i].u++, E[i].v++;
    con[E[i].u].push_back(i), con[E[i].v].push_back(i);
  }
  for (int i = 1; i <= 7; i++)
    if (!vis[i]) {
      visT++;
      int cnt = dfs(i);
      if (cnt > 0 && cnt != 2) {
        cout << "No solution" << endl;
        return 0;
      }
      if (cnt == 2) {
        int u = 0, v = 0;
        for (int i = 1; i <= 7; i++)
          if (vis[i] == visT && con[i].size() & 1) {
            if (u == 0)
              u = i;
            else
              v = i;
          }
        E[++n] = Edge(u, v);
        con[u].push_back(n), con[v].push_back(n);
      }
    }
  memset(vis, 0, sizeof vis);
  for (int i = 1; i <= 7; i++) dfs1(i, i);
  int cur_pos = 0, nnn = 0;
  for (int ii = 1; ii <= 7; ii++) {
    int st = 0;
    if (ans[ii].size()) nnn++;
    for (int i = 0; i < ans[ii].size(); i++)
      if (ans[ii][i].first > nn) {
        st = i;
        break;
      }
    for (int i = 0; i < ans[ii].size(); i++) {
      int u = (st + i) % ans[ii].size();
      if (ans[ii][u].first > nn) continue;
      cur_pos++;
      pos[cur_pos] = ans[ii][u];
    }
  }
  if (nnn > 1) {
    cout << "No solution" << endl;
    return 0;
  }
  for (int i = 1; i <= nn; i++)
    cout << pos[i].first << " "
         << "-+"[pos[i].second] << endl;
  return 0;
}
