

def count_unique_bsts(n):
    dp = [1]
    for i in xrange(1, n + 1):
        dp.append(sum((dp[j - 1] * dp[i - j] for j in xrange(1, i + 1))))

    return dp[-1]


if __name__ == '__main__':
    for x in range(8):
        print count_unique_bsts(x)
