text: #include<bits/stdc++.h>
  using namespace std;
  #define fi first
  #define	se second
  #define ll long long
  #define mp make_pair
  #define pb push_back
  #define lb lower_bound
  #define ub upper_bound
  #define all(v) v.begin(), v.end()
  #define allr(v) v.rbegin(), v.rend()
  #define beg(x) x.begin()
  #define en(x) x.end()
  #define f(i,s,n) for(long i=s;i<n;i++)
  #define fe(i,s,n) for(long i=s;i<=n;i++)
  #define fr(i,s,n) for(long i=s;i>n;i--)
  #define fre(i,s,n) for(long i=s;i>=n;i--)
  #define mod 998244353
  const ll INF_ll = 1e18;
  const ll INF_l = 1e6 + 1;
  //Anubhaw Bhalotia https://github.com/anubhawbhalotia
  typedef vector<int> vi;
  typedef vector<long> vl;
  typedef vector<ll> vll;
  typedef pair<int,int> pi;
  typedef pair<long,long> pl;
  typedef pair<ll,ll> pll;
  typedef set<int> si;
  typedef set<long> sl;
  typedef set<ll> sll;
  typedef multiset<int> msi;
  typedef multiset<long> msl;
  typedef multiset<ll> msll;
  class Solution {
  public:
      // string reverseVowels(string s) {
      //     string v = "";
      //     f(i, 0, s.length())
      //     {
      //         if(s[i] == 'a' || s[i] == 'e' || s[i] == 'i' || s[i] == 'o' || s[i] == 'u'
      //             || s[i] == 'A' || s[i] == 'E' || s[i] == 'I' || s[i] == 'O' || s[i] == 'U')
      //             v+=s[i];
      //     }
      //     int j = v.length() - 1;
      //     f(i, 0, s.length())
      //     {
      //         if(s[i] == 'a' || s[i] == 'e' || s[i] == 'i' || s[i] == 'o' || s[i] == 'u'
      //             || s[i] == 'A' || s[i] == 'E' || s[i] == 'I' || s[i] == 'O' || s[i] == 'U')
      //             s[i] = v[j--];
      //     }
      //     return s;
      // }
      
      //Using O(1) memory
      string reverseVowels(string s) {
          int i = 0;
          int j = s.length() - 1;
          while(i<j)
          {
              if(s[i] != 'a' && s[i] != 'e' && s[i] != 'i' && s[i] != 'o' && s[i] != 'u'
                  && s[i] != 'A' && s[i] != 'E' && s[i] != 'I' && s[i] != 'O' && s[i] != 'U')
                  i++;
              else if(s[j] != 'a' && s[j] != 'e' && s[j] != 'i' && s[j] != 'o' && s[j] != 'u'
                  && s[j] != 'A' && s[j] != 'E' && s[j] != 'I' && s[j] != 'O' && s[j] != 'U')
                  j--;
              else
              {
                  swap(s[i], s[j]);
                  i++;
                  j--;
              }
          }
          return s;
      }
  };