#include <bits/stdc++.h>
using namespace std;
const long long int lim = 100001;
long long int powe(long long int a, long long int b) {
  long long int ans = 1;
  while (b) {
    if (b & 1) {
      ans = ans * a;
    }
    a = a * a;
    b = b >> 1;
  }
  return ans;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  long long int t = 1;
  while (t > 0) {
    string s1, s2;
    long long int n;
    cin >> n;
    vector<long long int> input[n];
    map<long long int, long long int> make_pair;
    map<pair<long long int, long long int>, vector<long long int> > mp1;
    for (int i = 0; i < n - 2; i++) {
      vector<long long int> v(3, 0);
      cin >> v[0] >> v[1] >> v[2];
      sort(v.begin(), v.end());
      input[i] = v;
      make_pair[v[0]]++;
      make_pair[v[1]]++;
      make_pair[v[2]]++;
      mp1[{((v[0] < v[1]) ? (v[0]) : (v[1])),
           ((v[0] > v[1]) ? (v[0]) : (v[1]))}]
          .push_back(v[2]);
      mp1[{((v[1] < v[2]) ? (v[1]) : (v[2])),
           ((v[1] > v[2]) ? (v[1]) : (v[2]))}]
          .push_back(v[0]);
      mp1[{((v[0] < v[2]) ? (v[0]) : (v[2])),
           ((v[0] > v[2]) ? (v[0]) : (v[2]))}]
          .push_back(v[1]);
    }
    long long int p1;
    for (auto i : make_pair) {
      if (i.second == 1) {
        p1 = i.first;
        break;
      }
    }
    vector<long long int> fi;
    for (int i = 0; i < n - 2; i++) {
      vector<long long int> v = input[i];
      for (int j = 0; j <= 2; j++) {
        if (v[j] == p1) {
          fi = v;
          fi[j] = 0;
          break;
        }
      }
    }
    long long int x = -1, y = -1;
    for (int i = 0; i < 3; i++) {
      if (fi[i] == 0) continue;
      if (make_pair[fi[i]] == 2)
        x = fi[i];
      else
        y = fi[i];
    }
    vector<long long int> ans;
    ans.push_back(p1);
    ans.push_back(x);
    ans.push_back(y);
    vector<vector<long long int> > ranges;
    while (ans.size() < n) {
      long long int y = ans[ans.size() - 1];
      long long int x = ans[ans.size() - 2];
      long long int p1 = ans[ans.size() - 3];
      vector<long long int> temp =
          mp1[{((x < y) ? (x) : (y)), ((x > y) ? (x) : (y))}];
      for (auto i : temp) {
        if (i != p1) ans.push_back(i);
      }
    }
    for (auto i : ans) cout << i << " ";
    cout << '\n';
    t--;
  }
}
