Skip to main content
1 of 5
betseg
  • 8.7k
  • 3
  • 28
  • 60

C, 219 bytes

#define q(a)for(;a strchr("aeiouy",*s);putchar(*s++));
f(s,c,h)char*s;{char*a="bcdfgkpstvzhjlmnqrwx",*b="pgtvkgbzdfshjlmnqrwx";q(!)q()putchar(*s);c=b[strchr(a,*s)-a];h=s[strcspn(s,"aeiouy")];printf("%c%c%c%c",c,h,c,h);}

Try it online!

betseg
  • 8.7k
  • 3
  • 28
  • 60