# [R], 57 bytes <!-- language-all: lang-r --> function(s,t=s%in%utf8ToInt("aeiou"))s-t*32*!cumsum(t)%%2 [Try it online!][TIO-kxxnv8hv] [R]: https://www.r-project.org/ [TIO-kxxnv8hv]: https://tio.run/##fYw7EsIwDAV7TgGZ8YydIU1oKOAA6cMBHGODIJHAlvhd3piOBl67uy/mMN80OQg6BkKdlrxNClAJh3VPHbKurAeSypjUcL1q64WTKcmk2SjVZkDuaVdkHfR3M7i9D4cjnM7jhHS5xsRyuz@er3JkZj@qwY4WHUH0/yxb9uH5DQ "R – Try It Online" Input is vector of character codes (for comparison to [pajonk's answer](https://codegolf.stackexchange.com/a/240507/95126)). Would be [77 bytes](https://tio.run/##NYqxDsIgFAB3v0JJSKBpl7o4SJjd616KoE/bh5aHVn8ecfCmy@Xm7Nf7JvuEliCgWOpe9yqR33XhgFRHpZeaVOSAXDPjICQmAakLx/KI2FC1bauNTVNMkyDJeSuzF4KZwZ6cP1/gehsnDPfHHCk9X8v7w6Rc/Y7BjAZtgNn9iykUz18) with input as string (for comparison to [Maël's answer](https://codegolf.stackexchange.com/a/240492/95126)).