#include <bits/stdc++.h>
using namespace std;
const long long int N = 500;
long long int n, m, a, b, cnt = 0, t[N], f[N], p[N], seen[N], ma[N], ind, ans;
vector<long long int> v[N], ro, g, e, ve;
void dfs(long long int s, long long int r) {
  while (p[s] < (long long int)v[s].size()) {
    p[s]++;
    if (!seen[v[s][p[s] - 1]]) {
      seen[v[s][p[s] - 1]] = 1;
      dfs(s ^ t[v[s][p[s] - 1]] ^ f[v[s][p[s] - 1]], v[s][p[s] - 1]);
    }
  }
  ve.push_back(s);
  e.push_back(r);
}
void check(long long int s) {
  ma[s] = 1;
  for (auto y : v[s])
    if (ma[s ^ t[y] ^ f[y]] == 0) check(s ^ t[y] ^ f[y]);
}
int main() {
  ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  cin >> m;
  for (int i = 1; i <= m; i++) {
    cin >> a >> b;
    a++, b++;
    ro.push_back(a), ro.push_back(b);
    t[i] = a, f[i] = b;
    v[a].push_back(i);
    v[b].push_back(i);
  }
  sort(ro.begin(), ro.end());
  ro.resize(unique(ro.begin(), ro.end()) - ro.begin());
  for (int i = 1; i <= 7; i++)
    if (ma[i] == 0 && (long long int)v[i].size() > 0) {
      cnt++, check(i);
    }
  for (int i = 1; i <= 7; i++)
    if (v[i].size() % 2 == 1) g.push_back(i);
  if (g.size() > 2 || cnt > 1) {
    cout << "No solution";
    return 0;
  }
  if ((long long int)g.size() == 2) {
    t[m + 1] = g[0], f[m + 1] = g[1];
    v[g[0]].push_back(m + 1);
    v[g[1]].push_back(m + 1);
  }
  dfs(ro[0], 0);
  ind = 0;
  for (int i = 0; i < e.size(); i++)
    if (e[i] == m + 1) ind = i + 1;
  for (int i = ind; i < e.size() - 1; i++) {
    cout << e[i] << ' ';
    if (ve[i] == t[e[i]] && ve[i + 1] == f[e[i]])
      cout << '+';
    else
      cout << '-';
    cout << '\n';
  }
  for (int i = 0; i < ind - 1; i++) {
    cout << e[i] << ' ';
    if (ve[i] == t[e[i]] && ve[i + 1] == f[e[i]])
      cout << '+';
    else
      cout << '-';
    cout << '\n';
  }
}
