comefrom: <doocs>1411.Number of Ways to Paint N × 3 Grid_1.py
code: def numOfWays( n: int) -> int:
      mod = 10**9 + 7
      f0 = f1 = 6
      for _ in range(n - 1):
          g0 = (3 * f0 + 2 * f1) % mod
          g1 = (2 * f0 + 2 * f1) % mod
          f0, f1 = g0, g1
      return (f0 + f1) % mod
masked: def sample_funcname ( var_0 : int ) -> int :
      var_5 = 10 ** 9 + 7
      var_8 = var_6 = 6
      for var_11 in range ( var_0 - 1 ) :
          var_14 = ( 3 * var_8 + 2 * var_6 ) % var_5
          var_15 = ( 2 * var_8 + 2 * var_6 ) % var_5
          var_8 , var_6 = var_14 , var_15
      return ( var_8 + var_6 ) % var_5
  