#include <bits/stdc++.h>
using namespace std;
long long a[100005];
int main() {
  int n, hlf;
  scanf("%d", &n);
  if (n == 5) {
    cout << "1 2 3\n1 3 3\n2 4 2\n4 5 1\n3 4\n3 5";
    return 0;
  }
  hlf = n >> 1;
  int cnt = 1;
  for (int i = 1; i < n; i++) {
    if (i <= hlf) {
      cout << i << " " << (i + hlf) << " 1" << endl;
    } else {
      cout << i << " " << i + 1 << " " << cnt << endl;
      cnt += 2;
    }
  }
  for (int i = 1; i < hlf; i++) {
    cout << i << " " << i + 1 << endl;
  }
  cout << "1 3";
  return 0;
}
