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