import re


def parse_elapsed_times(qstat_output):
  """
    Read the "%H:%M:%S" strings from the last column of a `qstat` table.
    Return a list of parsed times, as 3-element lists.
    @returns Listof(List(Hour, Min, Sec))
             Hour = Min = Sec = Natural number
  """
  elaps = []
  for ln in qstat_output:
    m = re.search(r'([0-9]{2}):([0-9]{2}):([0-9]{2})$', ln)
    if m:
      elaps.append([int(m.group(i)) for i in range(1, 4)])
  return elaps