#include <algorithm>
#include <iostream>
#include <random>
#include <map>
using namespace std;

random_device rd;
mt19937 rng(rd());
uniform_int_distribution<int> d4(0,3), d10(0,9);

int state[4][4];

void reset() { for (int r=0; r<4; ++r) for (int c=0; c<4; ++c) state[r][c]=0; }

bool is_game_over() {
    for (int r=0; r<4; ++r) for (int c=0; c<4; ++c) if (state[r][c]==0) return false;
    for (int r=0; r<4; ++r) for (int c=0; c<3; ++c) if (state[r][c]==state[r][c+1]) return false;
    for (int r=0; r<3; ++r) for (int c=0; c<4; ++c) if (state[r][c]==state[r+1][c]) return false;
    return true;
}

void get_random_empty_cell(int &r, int &c) {
    r=-1; c=-1;
    int seen = 0;
    for (int rr=0; rr<4; ++rr) for (int cc=0; cc<4; ++cc) if (state[rr][cc]==0) ++seen;
    if (!seen) return;
    while (true) { r=d4(rng); c=d4(rng); if (state[r][c]==0) return; }
}

bool add_random_cell() {
    int r, c; get_random_empty_cell(r,c);
    if (r==-1) return false;
    state[r][c] = ( d10(rng)==0 ? 4 : 2 );
    return true;
}

bool compress(int *row) {
    int tmp[4], dal=0, hlp[4], bol=0;
    bool change = false;
    for (int i=0; i<4; ++i) if (row[i]) tmp[dal++]=row[i];
    for (int i=0; i<4; ++i) hlp[i]=0;
    for (int i=0; i<dal; ) { if (i+1<dal && tmp[i]==tmp[i+1]) { hlp[bol++]=2*tmp[i]; i+=2; } else { hlp[bol++]=tmp[i]; i+=1; } }
    for (int i=0; i<4; ++i) if (row[i]!=hlp[i]) change = true;
    for (int i=0; i<4; ++i) row[i]=hlp[i];
    return change;
}

bool move1(int r0, int c0, int dr, int dc) {
    int tmp[4];
    for (int i=0; i<4; ++i) tmp[i]=state[r0+i*dr][c0+i*dc];
    bool change = compress(tmp);
    for (int i=0; i<4; ++i) state[r0+i*dr][c0+i*dc]=tmp[i];
    return change;
}

void move(int d) {
    bool change = false;
    if (d==0) for (int c=0; c<4; ++c) change |= move1(0,c, 1,0);
    if (d==1) for (int c=0; c<4; ++c) change |= move1(3,c,-1,0);
    if (d==2) for (int r=0; r<4; ++r) change |= move1(r,0,0, 1);
    if (d==3) for (int r=0; r<4; ++r) change |= move1(r,3,0,-1);
    if (change) add_random_cell();
}

int game() {
    reset();
    add_random_cell();
    add_random_cell();
    while (!is_game_over()) move( d4(rng) );
    int answer = 0;
    for (int r=0; r<4; ++r) for (int c=0; c<4; ++c) answer = max( answer, state[r][c] );
    return answer;
}

int main() {
    map<int,int> stats;
    long long games; cin >> games;
    while (--games) ++stats[ game() ];
    for (auto tmp:stats) cout << tmp.first << ": " << tmp.second << endl;
}