input: Write a python function to generate the Fibonacci sequence up to the nth term and print the ones divisible by 3 in reverse order.
  assert fibonacci_divisible_by_3(5) == [3]
  assert fibonacci_divisible_by_3(10) == [21, 3]
  assert fibonacci_divisible_by_3(20) == [987, 144, 21, 3]
output: def fibonacci_divisible_by_3(n):
      def generate_fibonacci(n):
          fib_sequence = [0, 1]
          while len(fib_sequence) < n:
              fib_sequence.append(fib_sequence[-1] + fib_sequence[-2])
          return fib_sequence
      
      fib_sequence = generate_fibonacci(n)
      divisible_by_3 = [x for x in fib_sequence if x % 3 == 0]
      return divisible_by_3[::-1]