#include <bits/stdc++.h>
using namespace std;
long n;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  if (n != 5) {
    for (int i = 1; i <= n / 2; i++)
      cout << i << " " << i + n / 2 << " " << 1 << endl;
    for (int i = n / 2 + 1; i < n; i++)
      cout << i << " " << i + 1 << " " << 2 * i - n - 1 + n % 2 << endl;
    for (int i = 1; i < n / 2; i++) cout << i << " " << i + 1 << endl;
    cout << 1 << " " << 3 << endl;
  }
  if (n == 5) {
    cout << "1 2 3" << endl;
    cout << "2 4 2" << endl;
    cout << "4 5 1" << endl;
    cout << "1 3 3" << endl;
    cout << "3 4" << endl;
    cout << "3 5" << endl;
  }
  cin.get();
  cin.get();
  return 0;
}
