Rupee gains 12 paise