A function to reverse a tuple of size 3