# [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 [72 bytes](https://tio.run/##bYtBDsIgEEX3nkKbkEDTburGhT2A@3oAiqBoO6Mwo@jlEVfGxL98/72Q3XLbZsdgyCPI1MSeyW0G3AHJpBrqo/AgvqzS1iNXSsWW6nVXrwzPkWdJSogue6AB90WWThZ1NAfrjid/vkwz4PUWIvH9kZ6v0qvFrzzqSYNBH@yfU5d9cH4D) with input as string (for comparison to [Maël's answer](https://codegolf.stackexchange.com/a/240492/95126)).