#include <iostream>
#include <cmath>
using namespace std;
int main() {
int n, a[100],st[100][100]={0};//数组st[i][j]标记相互比赛过的两支队伍 i,j
cin >> n;
int ds = pow(2, n);//求队伍的数量
for (int i = 1; i <= ds; i++)
a[i] = i;//将每个队伍的序号存进数组a
for (int k = 1; k <= ds - 1; k++) {//总共比赛ds-1天
printf("<%d>", k);//输出比赛的天号
int st1[100] = {0}, cnt = 1;//数组st1标记队伍当天是否比赛过
for (int i = 1; i <= ds; i++) {// i 代表相互比赛的两个队伍中的前一支队伍
for (int j = 1; j <= ds; j++) {// j 代表相互比赛的两个队伍中的后一支队伍
/*如果两支队伍当天都未参加过比赛,并且这两支队伍以前没相互比赛,
就会进行一下操作,a[i]!=a[j]避免安排一个队伍与自己比赛*/
if (st1[i] == 0 && st1[j] == 0 && a[i] != a[j] && st[i][j] == 0) {
st1[i] = 1;//满足以上条件标记这支队伍当天比赛过
st1[j] = 1;//满足以上条件标记这支队伍当天比赛过
st[i][j] = 1;//标记相互比赛的两支队伍
printf("%d-%d",i,j);
cnt++;
if(cnt<=ds/2)cout<<",";
}
}
}
cout << endl;
}
return 0;
}