#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  if (n == 5) {
    cout << "1 2 3\n1 3 3\n2 4 2\n4 5 1\n3 4\n3 5";
    return 0;
  }
  int mid = n / 2;
  for (int i = 1; i <= mid; i++) {
    cout << i << " " << i + mid << " 1\n";
    if (n % 2 != 0 or i != mid)
      cout << mid + i << " " << mid + i + 1 << " " << 2 * i - 1 << "\n";
  }
  cout << "1 3\n";
  for (int i = 1; i < mid; i++) cout << i << " " << i + 1 << "\n";
  return 0;
}
