def argmin(sequence, vals):
  """
  Returns the argmin of sequence, where vals is the mapping of the sequence
  @sequence: a list of vars that map to vals
  @vals: the vals of the sequence
  example: argmin( ('x','y','z'), [2,3,1] ) returns 'z'
  """
  return sequence[ vals.index(min(vals)) ]