
def integer_break(n):
    if n <= 3:
        return n - 1
    if n < 5:
        return 2 * n / 2
    remainder = n % 3
    quotient = n / 3
    if remainder <= 1:
        remainder += 3
        quotient -= 1
    return 3 ** quotient * remainder


if __name__ == '__main__':
    for i in xrange(2, 12):
        print integer_break(i)
