input: Write a python function to combine the first and last elements separately in each sublist of a list of lists.
  assert merge([['x', 'y'], ['a', 'b'], ['m', 'n']]) == [['x', 'a', 'm'], ['y', 'b', 'n']]
  assert merge([[1, 2], [3, 4], [5, 6], [7, 8]]) == [[1, 3, 5, 7], [2, 4, 6, 8]]
  assert merge([['x', 'y','z' ], ['a', 'b','c'], ['m', 'n','o']]) == [['x', 'a', 'm'], ['y', 'b', 'n'],['z', 'c','o']]
output: def merge(lst):
      if not lst:
          return []
  
      n = len(lst[0])
      result = [[] for _ in range(n)]
      
      for sublist in lst:
          for i in range(n):
              result[i].append(sublist[i])
      
      return result