#include <bits/stdc++.h>
using namespace std;
int n, nn;
int main() {
  scanf("%d", &n);
  if (n == 5) {
    printf("1 2 3\n");
    printf("1 3 3\n");
    printf("2 4 2\n");
    printf("4 5 1\n");
    printf("3 4\n");
    printf("3 5\n");
    return 0;
  }
  nn = n / 2;
  for (int i = 1; i <= nn; ++i) printf("%d %d %d\n", i, i + nn, 1);
  for (int i = 1; i + nn < n; ++i)
    printf("%d %d %d\n", i + nn, i + nn + 1, 2 * i - 1);
  for (int i = 1; i < nn; ++i) printf("%d %d\n", i, i + 1);
  printf("1 3");
  return 0;
}
