#include<iostream>
using namespace std;
long long dp[40][40];
int main()
{
int n;
int k = 1;
dp[1][-1] = 1;
for (int i = 0; i < 40; i++)
{
for (int j = 0; j <= i; j++)
{
if (i == j)
dp[i][j] = dp[i][j - 1];
else
dp[i][j] = dp[i - 1][j] + dp[i][j - 1];
}
}
for (int i = 0; i < 10; i++)
{
for (int j = 0; j < 10; j++)
{
cout << dp[i][j]<<" ";
}
cout << endl;
}
while (cin >> n)
{
if (n == -1)
break;
printf("%d %d %I64d\n", k++, n, 2 * dp[n][n]);
}
return 0;
}