import random


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp


def shuffle1(n, a):
    for i in range(n):
        j = random.randint(0, n - 1)
        swap(a, i, j)


def shuffle2(n, a):
    for i in range(n):
        for j in range(n):
            if random.randint(0, 1):
                swap(a, i, j)


def shuffle3(n, a):
    for k in range(n):
        i = random.randint(0, n - 1)
        j = random.randint(0, n - 1)
        swap(a, i, j)


def shuffle4(n, a):
    for i in range(n):
        j = random.randint(i, n - 1)
        swap(a, i, j)


cnt = [0, 0, 0, 0, 0, 0]
for _ in range(640000):
    a = [1, 2, 3]
    shuffle3(3, a)
    if a == [1, 2, 3]:
        cnt[0] += 1
    elif a == [1, 3, 2]:
        cnt[1] += 1
    elif a == [2, 1, 3]:
        cnt[2] += 1
    elif a == [2, 3, 1]:
        cnt[3] += 1
    elif a == [3, 1, 2]:
        cnt[4] += 1
    elif a == [3, 2, 1]:
        cnt[5] += 1
print(cnt)
