Implement tribonacci, a variant of fibonacci, an O(lgn) solution using matrix exponentiation squaring.