#include <cstdio>
#include <algorithm>
#include <iostream>
#include <cstring>
#define N 1111111
int d[12][12][12][12][12];
void suan(int i, int j, int k, int l, int q){
    d[i][j][k][l][q] = 0;
    for (int p = i - 1; p >= 0; p -- )
        if (!d[p][j][k][l][q]) d[i][j][k][l][q] = 1;
    for (int p = j - 1; p >= i ? i + 1 : 0; p -- )
        if (!d[i][p][k][l][q]) d[i][j][k][l][q] = 1;
    for (int p = k - 1; p >= j ? j + 1 : 0; p -- )
        if (!d[i][j][p][l][q]) d[i][j][k][l][q] = 1;
    for (int p = l - 1; p >= k ? k + 1 : 0; p -- )
        if (!d[i][j][k][p][q]) d[i][j][k][l][q] = 1;
    for (int p = q - 1; p >= l ? l + 1 : 0; p -- )
        if (!d[i][j][k][l][p]) d[i][j][k][l][q] = 1;

}
int main(){freopen("t.in","r",stdin);freopen("t.out","w",stdout);
    memset(d, 255, sizeof d);
    int n = 12;
    for (int i = 0; i <= n; i ++ )
        for (int j = i; j <= n; j ++ )
            for (int k = j; k <= n; k ++ )
                for (int l = k; l <= n; l ++ )
                    for (int q = l; q <= n; q ++ ){
                        if (i == j && i) continue;
                        if (k == j && k) continue;
                        if (k == l && l) continue;
                        if (l == q && q) continue;
                        suan(i,j,k,l,q);
                        printf("%3d %3d %3d %3d %3d:%d %d\n",i,j,k,l,q,d[i][j][k][l][q],i^(j-j)^(k-j)^(l-l)^(q-l));
                    }
}