//\\..........torque.............\\//
#include <bits/stdc++.h>
using namespace std;
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define fast ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
using namespace __gnu_pbds;
#define ordered_set tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update>
//find_by_order(k): It returns to an iterator to the kth element (counting from zero) in the set
//order_of_key(k) : It returns to the number of items that are strictly smaller than our item k
#define pb push_back
#define f first
#define s second
#define F(i,a,b) for(i=a;i<b;i++)
#define nl   "\n"
#define sp   " "
#define all(c) (c).begin(),(c).end()
#define fast_cin() ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL)
typedef long double ld;
typedef long long   ll;
typedef vector<ll>  vll;
typedef pair<ll,ll> pll;
typedef vector<pll> vpll;
#define rev(i,b,a) for(int i=b;i>=a;i--)
#define  iota  cout<<-1<<nl
#define   cty  cout<<"YES"<<nl
#define ctn   cout<<"NO"<<nl
#define   lmax  LLONG_MAX
#define   lmin  LLONG_MIN
#define csp(x) cout<<(x)<<" "
#define c1(x) cout<<(x)<<nl
#define c2(x,y) cout<<(x)<<" "<<(y)<<nl
#define c3(x,y,z) cout<<(x)<<" "<<(y)<<" "<<(z)<<nl
#define c4(a,b,c,d) cout<<(a)<<" "<<(b)<<" "<<(c)<<" "<<(d)<<nl
#define c5(a,b,c,d,e) cout<<(a)<<" "<<(b)<<" "<<(c)<<" "<<(d)<<" "<<(e)<<nl
#define c6(a,b,c,d,e,f) cout<<(a)<<" "<<(b)<<" "<<(c)<<" "<<(d)<<" "<<(e)<<" "<<(f)<<nl
#define sz(v) (v).size()
const int mod=1e9+7;
const double pi=3.14159265358979323846264338327950288419716939937510582097494459230;
// priority_queue<t>

ll modI(ll a, ll m)
{
    ll m0=m,y=0,x=1;
    if(m==1) return 0;
    while(a>1)
    {
        ll q=a/m;
        ll t=m;
        m=a%m;
        a=t;
        t=y;
        y=x-q*y;
        x=t;
    }
    if(x<0) x+=m0;
    return x;
}
ll powm(ll a, ll b) {
	ll res=1;
	while(b) {
		if(b&1)
			res=(res*a)%mod;
		a=(a*a)%mod;
		b>>=1;
	}
	return res;
}
//*******************************************************************************************************************************************//
void solve()
{ ll i,j,x=0,y,n,l,r,d,cnt;
 cin>>n;
 vector<string>v(n);
 map<pair<ll,ll>,vll>m;
 map<ll,vll>m1;
 F(i,0,n){cin>>v[i];
          char ch;
          cnt=0;
          for(auto u:v[i])
              if(u=='a'||u=='e'||u=='i'||u=='o'||u=='u')
                cnt++,ch=u;
          m[{ch,cnt}].pb(i);
          m1[cnt].pb(i);
          }
 auto it=m1.begin();
 cnt=0;
 while(it!=m1.end())
 {
     auto temp=it->s;
     cnt+=sz(temp)/2;
     it++;
 }
 d=cnt/2;
 auto it1=m.begin();
 vpll used;
 bool fr[n]={0};
 while(it1!=m.end())
 {
     auto temp=it1->s;
    x=temp.size();
  x/=2;
     for(i=0;i<2*x;i+=2)
         if(d>0)
     fr[temp[i]]=1,fr[temp[i+1]]=1,used.pb({temp[i],temp[i+1]}),d--;
     it1++;
 }
 vpll faltu;
  it=m1.begin();
      vll temp1;
 while(it!=m1.end())
 {
     auto temp=it->s;
      x=sz(temp);
  temp1.clear();
     for(i=0;i<x;i++)
           if(!fr[temp[i]])
         temp1.pb(temp[i]);
     x=sz(temp1);
     x/=2;
      for(i=0;i<2*x;i+=2)
          faltu.pb({temp1[i],temp1[i+1]});
          it++;
 }
 d=min(sz(used),sz(faltu));
 c1(d);
 for(i=0;i<d;i++)
     c2(v[faltu[i].f],v[used[i].f]),c2(v[faltu[i].s],v[used[i].s]);

};
int main()
{fast;
    int t;
t=1;
//cin >>t;
 while(t--)
     solve();
}


//\\..........torque.............\\//
#include <bits/stdc++.h>
using namespace std;
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define fast ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
using namespace __gnu_pbds;
#define ordered_set tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update>
//find_by_order(k): It returns to an iterator to the kth element (counting from zero) in the set
//order_of_key(k) : It returns to the number of items that are strictly smaller than our item k
#define pb push_back
#define f first
#define s second
#define F(i,a,b) for(i=a;i<b;i++)
#define nl   "\n"
#define sp   " "
#define all(c) (c).begin(),(c).end()
#define fast_cin() ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL)
typedef long double ld;
typedef long long   ll;
typedef vector<ll>  vll;
typedef pair<ll,ll> pll;
typedef vector<pll> vpll;
#define rev(i,b,a) for(int i=b;i>=a;i--)
#define  iota  cout<<-1<<nl
#define   cty  cout<<"YES"<<nl
#define ctn   cout<<"NO"<<nl
#define   lmax  LLONG_MAX
#define   lmin  LLONG_MIN
#define csp(x) cout<<(x)<<" "
#define c1(x) cout<<(x)<<nl
#define c2(x,y) cout<<(x)<<" "<<(y)<<nl
#define c3(x,y,z) cout<<(x)<<" "<<(y)<<" "<<(z)<<nl
#define c4(a,b,c,d) cout<<(a)<<" "<<(b)<<" "<<(c)<<" "<<(d)<<nl
#define c5(a,b,c,d,e) cout<<(a)<<" "<<(b)<<" "<<(c)<<" "<<(d)<<" "<<(e)<<nl
#define c6(a,b,c,d,e,f) cout<<(a)<<" "<<(b)<<" "<<(c)<<" "<<(d)<<" "<<(e)<<" "<<(f)<<nl
#define sz(v) (v).size()
const int mod=1e9+7;
const double pi=3.14159265358979323846264338327950288419716939937510582097494459230;
// priority_queue<t>

ll modI(ll a, ll m)
{
    ll m0=m,y=0,x=1;
    if(m==1) return 0;
    while(a>1)
    {
        ll q=a/m;
        ll t=m;
        m=a%m;
        a=t;
        t=y;
        y=x-q*y;
        x=t;
    }
    if(x<0) x+=m0;
    return x;
}
ll powm(ll a, ll b) {
	ll res=1;
	while(b) {
		if(b&1)
			res=(res*a)%mod;
		a=(a*a)%mod;
		b>>=1;
	}
	return res;
}
//*******************************************************************************************************************************************//
void solve()
{ ll i,j,x=0,y,n,l,r,d,cnt;
 cin>>n;
 vector<string>v(n);
 map<pair<ll,ll>,vll>m;
 map<ll,vll>m1;
 F(i,0,n){cin>>v[i];
          char ch;
          cnt=0;
          for(auto u:v[i])
              if(u=='a'||u=='e'||u=='i'||u=='o'||u=='u')
                cnt++,ch=u;
          m[{ch,cnt}].pb(i);
          m1[cnt].pb(i);
          }
 auto it=m1.begin();
 cnt=0;
 while(it!=m1.end())
 {
     auto temp=it->s;
     cnt+=sz(temp)/2;
     it++;
 }

 auto it1=m.begin();
 vpll used;
 bool fr[n]={0};
 while(it1!=m.end())
 {
     auto temp=it1->s;
    x=temp.size();
  x/=2;
     for(i=0;i<x;i+=2)
     fr[temp[i]]=1,fr[temp[i+1]]=1,used.pb({temp[i],temp[i+1]}),d--;
     it1++;
 }
 vpll faltu;
  it=m1.begin();
      vll temp1;
 while(it!=m1.end())
 {
     auto temp=it->s;
      x=sz(temp);
  temp1.clear();
     for(i=0;i<x;i++)
           if(!fr[temp[i]])
         temp1.pb(temp[i]);
     x=sz(temp1);
     x/=2;
      for(i=0;i<2*x;i+=2)
          faltu.pb({temp1[i],temp1[i+1]});
          it++;
 }
if(sz(used)>sz(faltu))
{d=sz(used)-sz(faltu);
 d/=2;
 n=sz(used);
 for(i=n-1;i>n-1-d;i--)
     faltu.pb({used[i].f,used[i].s});

}
 d=min(sz(used),sz(faltu));
 c1(d);
 for(i=0;i<d;i++)
     c2(v[faltu[i].f],v[used[i].f]),c2(v[faltu[i].s],v[used[i].s]);

};
int main()
{fast;
    int t;
t=1;
//cin >>t;
 while(t--)
     solve();
}


//\\..........torque.............\\//
#include <bits/stdc++.h>
using namespace std;
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define fast ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
using namespace __gnu_pbds;
#define ordered_set tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update>
//find_by_order(k): It returns to an iterator to the kth element (counting from zero) in the set
//order_of_key(k) : It returns to the number of items that are strictly smaller than our item k
#define pb push_back
#define f first
#define s second
#define F(i,a,b) for(i=a;i<b;i++)
#define nl   "\n"
#define sp   " "
#define all(c) (c).begin(),(c).end()
#define fast_cin() ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL)
typedef long double ld;
typedef long long   ll;
typedef vector<ll>  vll;
typedef pair<ll,ll> pll;
typedef vector<pll> vpll;
#define rev(i,b,a) for(int i=b;i>=a;i--)
#define  iota  cout<<-1<<nl
#define   cty  cout<<"YES"<<nl
#define ctn   cout<<"NO"<<nl
#define   lmax  LLONG_MAX
#define   lmin  LLONG_MIN
#define csp(x) cout<<(x)<<" "
#define c1(x) cout<<(x)<<nl
#define c2(x,y) cout<<(x)<<" "<<(y)<<nl
#define c3(x,y,z) cout<<(x)<<" "<<(y)<<" "<<(z)<<nl
#define c4(a,b,c,d) cout<<(a)<<" "<<(b)<<" "<<(c)<<" "<<(d)<<nl
#define c5(a,b,c,d,e) cout<<(a)<<" "<<(b)<<" "<<(c)<<" "<<(d)<<" "<<(e)<<nl
#define c6(a,b,c,d,e,f) cout<<(a)<<" "<<(b)<<" "<<(c)<<" "<<(d)<<" "<<(e)<<" "<<(f)<<nl
#define sz(v) (v).size()
const int mod=1e9+7;
const double pi=3.14159265358979323846264338327950288419716939937510582097494459230;
// priority_queue<t>

ll modI(ll a, ll m)
{
    ll m0=m,y=0,x=1;
    if(m==1) return 0;
    while(a>1)
    {
        ll q=a/m;
        ll t=m;
        m=a%m;
        a=t;
        t=y;
        y=x-q*y;
        x=t;
    }
    if(x<0) x+=m0;
    return x;
}
ll powm(ll a, ll b) {
	ll res=1;
	while(b) {
		if(b&1)
			res=(res*a)%mod;
		a=(a*a)%mod;
		b>>=1;
	}
	return res;
}
//*******************************************************************************************************************************************//
void solve()
{ ll i,j,x=0,y,n,l,r,d,cnt;
 cin>>n;
 vector<string>v(n);
 map<pair<ll,ll>,vll>m;
 map<ll,vll>m1;
 F(i,0,n){cin>>v[i];
          char ch;
          cnt=0;
          for(auto u:v[i])
              if(u=='a'||u=='e'||u=='i'||u=='o'||u=='u')
                cnt++,ch=u;
          m[{ch,cnt}].pb(i);
          m1[cnt].pb(i);
          }
 auto it=m1.begin();
 cnt=0;
 while(it!=m1.end())
 {
     auto temp=it->s;
     cnt+=sz(temp)/2;
     it++;
 }
 d=cnt/2;
 auto it1=m.begin();
 vpll used;
 bool fr[n]={0};
 while(it1!=m.end())
 {
     auto temp=it1->s;
    x=temp.size();
  x/=2;
     for(i=0;i<x;i+=2)
             if(d>0)
         fr[temp[i]]=1,fr[temp[i+1]]=1,used.pb({temp[i],temp[i+1]}),d--;
     it1++;
 }
 vpll faltu;
  it=m1.begin();
      vll temp1;
 while(it!=m1.end())
 {
     auto temp=it->s;
      x=sz(temp);
  temp1.clear();
     for(i=0;i<x;i++)
           if(!fr[temp[i]])
         temp1.pb(temp[i]);
     x=sz(temp1);
     x/=2;
      for(i=0;i<2*x;i+=2)
          faltu.pb({temp1[i],temp1[i+1]});
          it++;
 }
 d=min(sz(faltu),sz(used));
 c1(d);
 for(i=0;i<d;i++)
     c2(v[faltu[i].f],v[used[i].f]),c2(v[faltu[i].s],v[used[i].s]);

};
int main()
{fast;
    int t;
t=1;
//cin >>t;
 while(t--)
     solve();
}


//\\..........torque.............\\//
#include <bits/stdc++.h>
using namespace std;
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define fast ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
using namespace __gnu_pbds;
#define ordered_set tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update>
//find_by_order(k): It returns to an iterator to the kth element (counting from zero) in the set
//order_of_key(k) : It returns to the number of items that are strictly smaller than our item k
#define pb push_back
#define f first
#define s second
#define F(i,a,b) for(i=a;i<b;i++)
#define nl   "\n"
#define sp   " "
#define all(c) (c).begin(),(c).end()
#define fast_cin() ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL)
typedef long double ld;
typedef long long   ll;
typedef vector<ll>  vll;
typedef pair<ll,ll> pll;
typedef vector<pll> vpll;
#define rev(i,b,a) for(int i=b;i>=a;i--)
#define  iota  cout<<-1<<nl
#define   cty  cout<<"YES"<<nl
#define ctn   cout<<"NO"<<nl
#define   lmax  LLONG_MAX
#define   lmin  LLONG_MIN
#define csp(x) cout<<(x)<<" "
#define c1(x) cout<<(x)<<nl
#define c2(x,y) cout<<(x)<<" "<<(y)<<nl
#define c3(x,y,z) cout<<(x)<<" "<<(y)<<" "<<(z)<<nl
#define c4(a,b,c,d) cout<<(a)<<" "<<(b)<<" "<<(c)<<" "<<(d)<<nl
#define c5(a,b,c,d,e) cout<<(a)<<" "<<(b)<<" "<<(c)<<" "<<(d)<<" "<<(e)<<nl
#define c6(a,b,c,d,e,f) cout<<(a)<<" "<<(b)<<" "<<(c)<<" "<<(d)<<" "<<(e)<<" "<<(f)<<nl
#define sz(v) (v).size()
const int mod=1e9+7;
const double pi=3.14159265358979323846264338327950288419716939937510582097494459230;
// priority_queue<t>

ll modI(ll a, ll m)
{
    ll m0=m,y=0,x=1;
    if(m==1) return 0;
    while(a>1)
    {
        ll q=a/m;
        ll t=m;
        m=a%m;
        a=t;
        t=y;
        y=x-q*y;
        x=t;
    }
    if(x<0) x+=m0;
    return x;
}
ll powm(ll a, ll b) {
	ll res=1;
	while(b) {
		if(b&1)
			res=(res*a)%mod;
		a=(a*a)%mod;
		b>>=1;
	}
	return res;
}
//*******************************************************************************************************************************************//
void solve()
{ ll i,j,x=0,y,n,l,r,d,cnt;
 cin>>n;
 vector<string>v(n);
 map<pair<ll,ll>,vll>m;
 map<ll,vll>m1;
 F(i,0,n){cin>>v[i];
          char ch;
          cnt=0;
          for(auto u:v[i])
              if(u=='a'||u=='e'||u=='i'||u=='o'||u=='u')
                cnt++,ch=u;
          m[{ch,cnt}].pb(i);
          m1[cnt].pb(i);
          }
 auto it=m1.begin();
 cnt=0;
 while(it!=m1.end())
 {
     auto temp=it->s;
     cnt+=sz(temp)/2;
     it++;
 }
 d=cnt/2;
 auto it1=m.begin();
 vpll used;
 bool fr[n]={0};
 while(it1!=m.end())
 {
     auto temp=it1->s;
    x=temp.size();
  x/=2;
     for(i=0;i<x;i+=2)
             if(d>0)
         fr[temp[i]]=1,fr[temp[i+1]]=1,used.pb({temp[i],temp[i+1]}),d--;
     it1++;
 }
 vpll faltu;
  it=m1.begin();
      vll temp1;
 while(it!=m1.end())
 {
     auto temp=it->s;
      x=sz(temp);
  temp1.clear();
     for(i=0;i<x;i++)
           if(!fr[temp[i]])
         temp1.pb(temp[i]);
     x=sz(temp1);
     x/=2;
      for(i=0;i<2*x;i+=2)
          faltu.pb({temp1[i],temp1[i+1]});
          it++;
 }
if(sz(used)>sz(faltu))
{d=sz(used)-sz(faltu);
 d/=2;
 n=sz(used);
 for(i=n-1;i>n-1-d;i--)
     faltu.pb({used[i].f,used[i].s});

}
 d=min(sz(used),sz(faltu));
 c1(d);
 for(i=0;i<d;i++)
     c2(v[faltu[i].f],v[used[i].f]),c2(v[faltu[i].s],v[used[i].s]);

};
int main()
{fast;
    int t;
t=1;
//cin >>t;
 while(t--)
     solve();
}


//\\..........torque.............\\//
#include <bits/stdc++.h>
using namespace std;
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define fast ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
using namespace __gnu_pbds;
#define ordered_set tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update>
//find_by_order(k): It returns to an iterator to the kth element (counting from zero) in the set
//order_of_key(k) : It returns to the number of items that are strictly smaller than our item k
#define pb push_back
#define f first
#define s second
#define F(i,a,b) for(i=a;i<b;i++)
#define nl   "\n"
#define sp   " "
#define all(c) (c).begin(),(c).end()
#define fast_cin() ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL)
typedef long double ld;
typedef long long   ll;
typedef vector<ll>  vll;
typedef pair<ll,ll> pll;
typedef vector<pll> vpll;
#define rev(i,b,a) for(int i=b;i>=a;i--)
#define  iota  cout<<-1<<nl
#define   cty  cout<<"YES"<<nl
#define ctn   cout<<"NO"<<nl
#define   lmax  LLONG_MAX
#define   lmin  LLONG_MIN
#define csp(x) cout<<(x)<<" "
#define c1(x) cout<<(x)<<nl
#define c2(x,y) cout<<(x)<<" "<<(y)<<nl
#define c3(x,y,z) cout<<(x)<<" "<<(y)<<" "<<(z)<<nl
#define c4(a,b,c,d) cout<<(a)<<" "<<(b)<<" "<<(c)<<" "<<(d)<<nl
#define c5(a,b,c,d,e) cout<<(a)<<" "<<(b)<<" "<<(c)<<" "<<(d)<<" "<<(e)<<nl
#define c6(a,b,c,d,e,f) cout<<(a)<<" "<<(b)<<" "<<(c)<<" "<<(d)<<" "<<(e)<<" "<<(f)<<nl
#define sz(v) (v).size()
const int mod=1e9+7;
const double pi=3.14159265358979323846264338327950288419716939937510582097494459230;
// priority_queue<t>

ll modI(ll a, ll m)
{
    ll m0=m,y=0,x=1;
    if(m==1) return 0;
    while(a>1)
    {
        ll q=a/m;
        ll t=m;
        m=a%m;
        a=t;
        t=y;
        y=x-q*y;
        x=t;
    }
    if(x<0) x+=m0;
    return x;
}
ll powm(ll a, ll b) {
	ll res=1;
	while(b) {
		if(b&1)
			res=(res*a)%mod;
		a=(a*a)%mod;
		b>>=1;
	}
	return res;
}
//*******************************************************************************************************************************************//
void solve()
{ ll i,j,x=0,y,n,l,r,d,cnt;
 cin>>n;
 vector<string>v(n);
 map<pair<ll,ll>,vll>m;
 map<ll,vll>m1;
 F(i,0,n){cin>>v[i];
          char ch;
          cnt=0;
          for(auto u:v[i])
              if(u=='a'||u=='e'||u=='i'||u=='o'||u=='u')
                cnt++,ch=u;
          m[{ch,cnt}].pb(i);
          m1[cnt].pb(i);
          }
 auto it=m1.begin();
 cnt=0;
 while(it!=m1.end())
 {
     auto temp=it->s;
     cnt+=sz(temp)/2;
     it++;
 }

 auto it1=m.begin();
 vpll used;
 bool fr[n]={0};
 while(it1!=m.end())
 {
     auto temp=it1->s;
    x=temp.size();
  x/=2;
     for(i=0;i<2*x;i+=2)
     fr[temp[i]]=1,fr[temp[i+1]]=1,used.pb({temp[i],temp[i+1]});
     it1++;
 }
 vpll faltu;
  it=m1.begin();
      vll temp1;
 while(it!=m1.end())
 {
     auto temp=it->s;
      x=sz(temp);
  temp1.clear();
     for(i=0;i<x;i++)
           if(!fr[temp[i]])
         temp1.pb(temp[i]);
     x=sz(temp1);
     x/=2;
      for(i=0;i<2*x;i+=2)
          faltu.pb({temp1[i],temp1[i+1]});
          it++;
 }
if(sz(used)>sz(faltu))
{d=sz(used)-sz(faltu);
 d/=2;
 n=sz(used);
 for(i=n-1;i>n-1-d;i--)
     faltu.pb({used[i].f,used[i].s});

}
 d=min(sz(used),sz(faltu));
 c1(d);
 for(i=0;i<d;i++)
     c2(v[faltu[i].f],v[used[i].f]),c2(v[faltu[i].s],v[used[i].s]);

};
int main()
{fast;
    int t;
t=1;
//cin >>t;
 while(t--)
     solve();
}


//\\..........torque.............\\//
#include <bits/stdc++.h>
using namespace std;
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define fast ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
using namespace __gnu_pbds;
#define ordered_set tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update>
//find_by_order(k): It returns to an iterator to the kth element (counting from zero) in the set
//order_of_key(k) : It returns to the number of items that are strictly smaller than our item k
#define pb push_back
#define f first
#define s second
#define F(i,a,b) for(i=a;i<b;i++)
#define nl   "\n"
#define sp   " "
#define all(c) (c).begin(),(c).end()
#define fast_cin() ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL)
typedef long double ld;
typedef long long   ll;
typedef vector<ll>  vll;
typedef pair<ll,ll> pll;
typedef vector<pll> vpll;
#define rev(i,b,a) for(int i=b;i>=a;i--)
#define  iota  cout<<-1<<nl
#define   cty  cout<<"YES"<<nl
#define ctn   cout<<"NO"<<nl
#define   lmax  LLONG_MAX
#define   lmin  LLONG_MIN
#define csp(x) cout<<(x)<<" "
#define c1(x) cout<<(x)<<nl
#define c2(x,y) cout<<(x)<<" "<<(y)<<nl
#define c3(x,y,z) cout<<(x)<<" "<<(y)<<" "<<(z)<<nl
#define c4(a,b,c,d) cout<<(a)<<" "<<(b)<<" "<<(c)<<" "<<(d)<<nl
#define c5(a,b,c,d,e) cout<<(a)<<" "<<(b)<<" "<<(c)<<" "<<(d)<<" "<<(e)<<nl
#define c6(a,b,c,d,e,f) cout<<(a)<<" "<<(b)<<" "<<(c)<<" "<<(d)<<" "<<(e)<<" "<<(f)<<nl
#define sz(v) (v).size()
const int mod=1e9+7;
const double pi=3.14159265358979323846264338327950288419716939937510582097494459230;
// priority_queue<t>

ll modI(ll a, ll m)
{
    ll m0=m,y=0,x=1;
    if(m==1) return 0;
    while(a>1)
    {
        ll q=a/m;
        ll t=m;
        m=a%m;
        a=t;
        t=y;
        y=x-q*y;
        x=t;
    }
    if(x<0) x+=m0;
    return x;
}
ll powm(ll a, ll b) {
	ll res=1;
	while(b) {
		if(b&1)
			res=(res*a)%mod;
		a=(a*a)%mod;
		b>>=1;
	}
	return res;
}
//*******************************************************************************************************************************************//
void solve()
{ ll i,j,x=0,y,n,l,r,d,cnt;
 cin>>n;
 vector<string>v(n);
 map<pair<ll,ll>,vll>m;
 map<ll,vll>m1;
 F(i,0,n){cin>>v[i];
          char ch;
          cnt=0;
          for(auto u:v[i])
              if(u=='a'||u=='e'||u=='i'||u=='o'||u=='u')
                cnt++,ch=u;
          m[{ch,cnt}].pb(i);
          m1[cnt].pb(i);
          }
 auto it=m1.begin();
 cnt=0;
 while(it!=m1.end())
 {
     auto temp=it->s;
     cnt+=sz(temp)/2;
     it++;
 }
 d=cnt/2;
 auto it1=m.begin();
 vpll used;
 bool fr[n]={0};
 while(it1!=m.end())
 {
          auto temp=it1->s;
       x=sz(temp)/2;
     for(i=0;i<2*x;i+=2)
             if(d>0)
         fr[temp[i]]=1,fr[temp[i+1]]=1,used.pb({temp[i],temp[i+1]}),d--;
     it1++;

 }
 vpll faltu;
  it=m1.begin();
 while(it!=m1.end())
 {
     auto temp=it->s;
      x=sz(temp)/2;
     for(i=0;i<2*x;i+=2)
           if(!fr[temp[i]]&&!fr[temp[i]])
         faltu.pb({temp[i],temp[i+1]});
         it++;

 }
 d=min(sz(faltu),sz(used));
 c1(d);
 for(i=0;i<d;i++)
     c2(v[faltu[i].f],v[used[i].f]),c2(v[faltu[i].s],v[used[i].s]);

};
int main()
{fast;
    int t;
t=1;
//cin >>t;
 while(t--)
     solve();
}


#include<bits/stdc++.h>
using namespace std;

char findLast(string str)
{
    reverse(str.begin(), str.end());
    for(auto it=str.begin(); it!=str.end(); it++)
    {
        if(*it == 'a' || *it == 'e' || *it == 'i' || *it == 'o' || *it == 'u')
            return *it;
    }
}

int main()
{

    int n;
    cin>>n;

    map<string, int> vow;
    map<string, int> cnt;
    vector<pair<string, string>> other;
    vector<pair<string, string>> that;
    string s;
    for(int i=0; i<n; i++)
    {
        cin>>s;
        if(vow.find(s) != vow.end())
            cnt[s]++;
        else
            cnt[s] = 1;
        int c = 0;
        if(vow.find(s) == vow.end())
        {
            for(auto it=s.begin(); it!=s.end(); it++)
            {
                if(*it == 'a' || *it == 'e' || *it == 'i' || *it == 'o' || *it == 'u')
                    c++;
            }
            vow[s] = c;
        }
    }

    for(auto it=cnt.begin(); it!= cnt.end(); it++)
    {
        s = it->first;
        if(cnt[s] > 1)
        {
            if(cnt[s]%2 == 0)
            {
                while(cnt[s])
                {
                    other.push_back(make_pair(s, s));
                    cnt[s] = cnt[s]-2;
                }
                cnt.erase(s);
                vow.erase(s);
            }
            else
            {
                while(cnt[s] > 1)
                {
                    other.push_back(make_pair(s, s));
                    cnt[s] = cnt[s]-2;
                }
            }
        }
    }

    for(auto it=vow.begin(); it!=vow.end(); ++it)
    {
        for(auto pt=vow.begin(); pt!= vow.end(); ++pt)
        {
            if(it == pt)
                continue;
            if(it->second == pt->second)
            {
                //char iska = findLast(it->first);
                //char uska = findLast(pt->first);
                //cout<<it->first<<" "<<pt->first<<endl;
                //cout<<iska<<" "<<uska<<endl;
                if(findLast(it->first) == findLast(pt->first))
                {
                    //cout<<"ghusa"<<endl;
                    other.push_back(make_pair(it->first, pt->first));
                    auto gt = vow.find(it->first);
                    if(gt!=vow.end())
                        vow.erase(gt);
                    gt = vow.find(pt->first);
                    if(gt!=vow.end())
                        vow.erase(gt);
                    break;
                }
            }
        }
        if(vow.size() == 0) break;
    }
    for(auto it=vow.begin(); it!=vow.end(); it++)
    {
        for(auto pt=vow.begin(); pt!= vow.end(); pt++)
        {
            if(it == pt)
                continue;
            if(it->second == pt->second)
            {
                that.push_back(make_pair(it->first, pt->first));
                vow.erase(it->first);
                vow.erase(pt->first);
                break;
            }
        }
        if(vow.size() == 0) break;
    }

    int ans;
    if(other.size() == 0)
    {
        cout<<"0"<<endl;
        exit(0);
    }
    if(other.size() > that.size())
    {
        ans = (other.size() + that.size() )/ 2;
        int rem = ans-that.size();
        cout<<ans<<endl;
        auto it = other.begin();
        auto pt = that.begin();
        for(int i=0; i<that.size(); i++)
        {
            cout<<pt->first<<" "<<it->first<<endl;
            cout<<pt->second<<" "<<it->second<<endl;
            it++;
            pt++;
        }
        auto gt = other.rbegin();
        for(int i=0; i<rem; i++)
        {
            cout<<gt->first<<" "<<it->first<<endl;
            cout<<gt->second<<" "<<it->second<<endl;
            it++;
            gt--;
        }
    }
    else if(other.size() <= that.size())
    {
        ans = that.size();
        cout<<ans<<endl;
        for(int i=0; i<ans; i++)
        {
            cout<<that[0].first<<" "<<other[0].first<<endl;
            cout<<that[0].second<<" "<<that[0].second<<endl;
        }
    }

    return 0;
}


#include<bits/stdc++.h>
using namespace std;

char findLast(string str)
{
    reverse(str.begin(), str.end());
    for(auto it=str.begin(); it!=str.end(); it++)
    {
        if(*it == 'a' || *it == 'e' || *it == 'i' || *it == 'o' || *it == 'u')
            return *it;
    }
}

int main()
{
    int n;
    cin>>n;

    map<string, int> vow;
    map<string, int> cnt;
    vector<pair<string, string>> other;
    vector<pair<string, string>> that;
    string s;
    for(int i=0; i<n; i++)
    {
        cin>>s;
        if(vow.find(s) != vow.end())
            cnt[s]++;
        else
            cnt[s] = 1;
        int c = 0;
        if(vow.find(s) == vow.end())
        {
            for(auto it=s.begin(); it!=s.end(); it++)
            {
                if(*it == 'a' || *it == 'e' || *it == 'i' || *it == 'o' || *it == 'u')
                    c++;
            }
            vow[s] = c;
        }
    }

    for(auto it=cnt.begin(); it!= cnt.end(); it++)
    {
        s = it->first;
        if(cnt[s] > 1)
        {
            if(cnt[s]%2 == 0)
            {
                while(cnt[s])
                {
                    other.push_back(make_pair(s, s));
                    cnt[s] = cnt[s]-2;
                }
                cnt.erase(s);
                vow.erase(s);
            }
            else
            {
                while(cnt[s] > 1)
                {
                    other.push_back(make_pair(s, s));
                    cnt[s] = cnt[s]-2;
                }
            }
        }
    }

    for(auto it=vow.begin(); it!=vow.end(); ++it)
    {
        for(auto pt=vow.begin(); pt!= vow.end(); ++pt)
        {
            if(it == pt)
                continue;
            if(it->second == pt->second)
            {
                //char iska = findLast(it->first);
                //char uska = findLast(pt->first);
                //cout<<it->first<<" "<<pt->first<<endl;
                //cout<<iska<<" "<<uska<<endl;
                if(findLast(it->first) == findLast(pt->first))
                {
                    //cout<<"ghusa"<<endl;
                    other.push_back(make_pair(it->first, pt->first));
                    auto gt = vow.find(it->first);
                    if(gt!=vow.end())
                        vow.erase(gt);
                    gt = vow.find(pt->first);
                    if(gt!=vow.end())
                        vow.erase(gt);
                    break;
                }
            }
        }
        if(vow.size() == 0) break;
    }
    for(auto it=vow.begin(); it!=vow.end(); it++)
    {
        for(auto pt=vow.begin(); pt!= vow.end(); pt++)
        {
            if(it == pt)
                continue;
            if(it->second == pt->second)
            {
                that.push_back(make_pair(it->first, pt->first));
                vow.erase(it->first);
                vow.erase(pt->first);
                break;
            }
        }
        if(vow.size() == 0) break;
    }

    int ans;
    if(other.size() == 0)
    {
        cout<<"0"<<endl;
        exit(0);
    }
    if(other.size() > that.size())
    {
        ans = (other.size() + that.size() )/ 2;
        int rem = ans-that.size();
        cout<<ans<<endl;
        auto it = other.begin();
        auto pt = that.begin();
        for(int i=0; i<=that.size(); i++)
        {
            cout<<pt->first<<" "<<it->first<<endl;
            cout<<pt->second<<" "<<it->second<<endl;
            it++;
            pt++;
            i++;
        }
        auto gt = other.rbegin();
        for(int i=0; i<rem; i++)
        {
            cout<<gt->first<<" "<<it->first<<endl;
            cout<<gt->second<<" "<<it->second<<endl;
            it++;
            gt--;
            i++;
        }
    }
    else if(other.size() <= that.size())
    {
        ans = that.size();
        cout<<ans<<endl;
        for(int i=0; i<ans; i++)
        {
            cout<<that[0].first<<" "<<other[0].first<<endl;
            cout<<that[0].second<<" "<<that[0].second<<endl;
        }
    }

    return 0;
}


#include<bits/stdc++.h>
using namespace std;

char findLast(string str)
{
    reverse(str.begin(), str.end());
    for(auto it=str.begin(); it!=str.end(); it++)
    {
        if(*it == 'a' || *it == 'e' || *it == 'i' || *it == 'o' || *it == 'u')
            return *it;
    }
}

int main()
{
    int n;
    cin>>n;

    map<string, int> vow;
    map<string, int> cnt;
    vector<pair<string, string>> other;
    vector<pair<string, string>> that;
    string s;
    for(int i=0; i<n; i++)
    {
        cin>>s;
        if(vow.find(s) != vow.end())
            cnt[s]++;
        else
            cnt[s] = 1;
        int c = 0;
        if(vow.find(s) == vow.end())
        {
            for(auto it=s.begin(); it!=s.end(); it++)
            {
                if(*it == 'a' || *it == 'e' || *it == 'i' || *it == 'o' || *it == 'u')
                    c++;
            }
            vow[s] = c;
        }
    }

    auto it=cnt.begin();
    auto temp= cnt.begin();
    while(it!= cnt.end())
    {
        it++;
        temp = it;
        it--;
        s = it->first;
        if(cnt[s] > 1)
        {
            if(cnt[s]%2 == 0)
            {
                while(cnt[s]>0)
                {
                    other.push_back(make_pair(s, s));
                    cnt[s] = cnt[s]-2;
                }
                auto gt = cnt.find(s);
                if(gt == temp)
                    temp++;
                if(gt!=cnt.end())
                    cnt.erase(s);
                gt = vow.find(s);
                if(gt!=vow.end())
                    vow.erase(s);
            }
            else
            {
                while(cnt[s] > 1)
                {
                    other.push_back(make_pair(s, s));
                    cnt[s] = cnt[s]-2;
                }
            }
        }
        it = temp;
        if(cnt.size() == 0)
            break;
    }

    it=vow.begin();
    while(it!=vow.end())
    {
        auto temp = vow.end();
        auto pt = vow.end();
        for(pt=vow.begin()++; pt!= vow.end(); pt++)
        {
            if(it == pt)
                continue;
            if(it->second == pt->second)
            {
                if(findLast(it->first) == findLast(pt->first))
                {
                    other.push_back(make_pair(it->first, pt->first));
                    it++;
                    temp = it;
                    if(it == pt)
                    {
                        pt++;
                        temp = pt;
                        pt--;
                    }
                    it--;
                    auto gt = vow.find(it->first);
                    if(gt!=vow.end())
                        vow.erase(it->first);

                    gt = vow.find(pt->first);
                    if(gt!=vow.end())
                        vow.erase(pt->first);
                    it = temp;
                    break;
                }
            }
        }
        if(pt==vow.end())
            it++;
        if(vow.size() <= 1)
            break;
    }
    it=vow.begin();
    while(it!=vow.end())
    {
        auto temp = vow.end();
        auto pt = vow.end();
        for(pt=vow.begin(); pt!= vow.end(); pt++)
        {
            if(it == pt)
                continue;
            if(it->second == pt->second)
            {
                that.push_back(make_pair(it->first, pt->first));
                it++;
                temp = it;
                if(it == pt)
                {
                    pt++;
                    temp = pt;
                    pt--;
                }
                it--;
                vow.erase(it->first);
                vow.erase(pt->first);
                it = temp;
                break;
            }
        }
        if(pt==vow.end())
            it++;
        if(vow.size() == 0) break;
    }

    int ans;
    if(other.size() == 0)
    {
        cout<<"0"<<endl;
        exit(0);
    }
    if(other.size() > that.size())
    {
        ans = (other.size() + that.size() )/ 2;
        int rem = ans-that.size();
        cout<<ans<<endl;
        auto it = other.begin();
        auto pt = that.begin();
        for(int i=0; i<that.size(); i++)
        {
            cout<<pt->first<<" "<<it->first<<endl;
            cout<<pt->second<<" "<<it->second<<endl;
            it++;
            pt++;
        }
        vector<pair<string, string>>::reverse_iterator gt;
        gt = other.rbegin();
        for(int i=0; i<rem; i++)
        {
            cout<<gt->first<<" "<<it->first<<endl;
            cout<<gt->second<<" "<<it->second<<endl;
            it++;
            gt++;
        }
    }
    else if(other.size() <= that.size())
    {
        ans = other.size()/2;
        cout<<ans<<endl;
        auto it = that.begin();
        auto pt = other.begin();
        for(int i=0; i<ans; i++)
        {
            cout<<it->first<<" "<<pt->first<<endl;
            cout<<it->second<<" "<<pt->second<<endl;
            it++;
            pt++;
        }
    }

    return 0;
}


#include<bits/stdc++.h>
using namespace std;

char findLast(string str)
{
    reverse(str.begin(), str.end());
    for(auto it=str.begin(); it!=str.end(); it++)
    {
        if(*it == 'a' || *it == 'e' || *it == 'i' || *it == 'o' || *it == 'u')
            return *it;
    }
}

int main()
{
    int n;
    cin>>n;

    map<string, int> vow;
    map<string, int> cnt;
    vector<pair<string, string>> other;
    vector<pair<string, string>> that;
    string s;
    for(int i=0; i<n; i++)
    {
        cin>>s;
        if(vow.find(s) != vow.end())
            cnt[s]++;
        else
            cnt[s] = 1;
        int c = 0;
        if(vow.find(s) == vow.end())
        {
            for(auto it=s.begin(); it!=s.end(); it++)
            {
                if(*it == 'a' || *it == 'e' || *it == 'i' || *it == 'o' || *it == 'u')
                    c++;
            }
            vow[s] = c;
        }
    }

    for(auto it=cnt.begin(); it!= cnt.end(); it++)
    {
        s = it->first;
        if(cnt[s] > 1)
        {
            if(cnt[s]%2 == 0)
            {
                while(cnt[s]>0)
                {
                    other.push_back(make_pair(s, s));
                    cnt[s] = cnt[s]-2;
                }
                auto gt = cnt.find(s);
                if(gt!=cnt.end())
                    cnt.erase(s);
                gt = vow.find(s);
                if(gt!=vow.end())
                    vow.erase(s);
            }
            else
            {
                while(cnt[s] > 1)
                {
                    other.push_back(make_pair(s, s));
                    cnt[s] = cnt[s]-2;
                }
            }
        }
        if(cnt.size() == 0)
            break;
    }

    auto it=vow.begin();
    while(it!=vow.end())
    {
        auto temp = vow.end();
        auto pt = vow.end();
        for(pt=vow.begin()++; pt!= vow.end(); pt++)
        {
            if(it == pt)
                continue;
            if(it->second == pt->second)
            {
                if(findLast(it->first) == findLast(pt->first))
                {
                    other.push_back(make_pair(it->first, pt->first));
                    it++;
                    temp = it;
                    if(it == pt)
                    {
                        pt++;
                        temp = pt;
                        pt--;
                    }
                    it--;
                    auto gt = vow.find(it->first);
                    if(gt!=vow.end())
                        vow.erase(it->first);

                    gt = vow.find(pt->first);
                    if(gt!=vow.end())
                        vow.erase(pt->first);
                    it = temp;
                    break;
                }
            }
        }
        if(pt==vow.end())
            it++;
        if(vow.size() <= 1)
            break;
    }
    for(auto it=vow.begin(); it!=vow.end(); it++)
    {
        for(auto pt=vow.begin(); pt!= vow.end(); pt++)
        {
            if(it == pt)
                continue;
            if(it->second == pt->second)
            {
                that.push_back(make_pair(it->first, pt->first));
                vow.erase(it->first);
                vow.erase(pt->first);
                break;
            }
        }
        if(vow.size() == 0) break;
    }

    int ans;
    if(other.size() == 0)
    {
        cout<<"0"<<endl;
        exit(0);
    }
    if(other.size() > that.size())
    {
        ans = (other.size() + that.size() )/ 2;
        int rem = ans-that.size();
        cout<<ans<<endl;
        auto it = other.begin();
        auto pt = that.begin();
        for(int i=0; i<that.size(); i++)
        {
            cout<<pt->first<<" "<<it->first<<endl;
            cout<<pt->second<<" "<<it->second<<endl;
            it++;
            pt++;
        }
        vector<pair<string, string>>::reverse_iterator gt;
        gt = other.rbegin();
        for(int i=0; i<rem; i++)
        {
            cout<<gt->first<<" "<<it->first<<endl;
            cout<<gt->second<<" "<<it->second<<endl;
            it++;
            gt++;
        }
    }
    else if(other.size() <= that.size())
    {
        ans = that.size();
        cout<<ans<<endl;
        auto it = that.begin();
        auto pt = other.begin();
        for(int i=0; i<ans; i++)
        {
            cout<<it->first<<" "<<pt->first<<endl;
            cout<<it->second<<" "<<pt->second<<endl;
            it++;
            pt++;
        }
    }

    return 0;
}


#include<bits/stdc++.h>
using namespace std;

char findLast(string str)
{
    reverse(str.begin(), str.end());
    for(auto it=str.begin(); it!=str.end(); it++)
    {
        if(*it == 'a' || *it == 'e' || *it == 'i' || *it == 'o' || *it == 'u')
            return *it;
    }
}

int main()
{
    int n;
    cin>>n;

    map<string, int> vow;
    map<string, int> cnt;
    vector<pair<string, string>> other;
    vector<pair<string, string>> that;
    string s;
    for(int i=0; i<n; i++)
    {
        cin>>s;
        if(vow.find(s) != vow.end())
            cnt[s]++;
        else
            cnt[s] = 1;
        int c = 0;
        if(vow.find(s) == vow.end())
        {
            for(auto it=s.begin(); it!=s.end(); it++)
            {
                if(*it == 'a' || *it == 'e' || *it == 'i' || *it == 'o' || *it == 'u')
                    c++;
            }
            vow[s] = c;
        }
    }

    for(auto it=cnt.begin(); it!= cnt.end(); it++)
    {
        s = it->first;
        if(cnt[s] > 1)
        {
            if(cnt[s]%2 == 0)
            {
                while(cnt[s])
                {
                    other.push_back(make_pair(s, s));
                    cnt[s] = cnt[s]-2;
                }
                cnt.erase(s);
                vow.erase(s);
            }
            else
            {
                while(cnt[s] > 1)
                {
                    other.push_back(make_pair(s, s));
                    cnt[s] = cnt[s]-2;
                }
            }
        }
    }

    for(auto it=vow.begin(); it!=vow.end(); ++it)
    {
        for(auto pt=vow.begin(); pt!= vow.end(); ++pt)
        {
            if(it == pt)
                continue;
            if(it->second == pt->second)
            {
                char iska = findLast(it->first);
                char uska = findLast(pt->first);
                //cout<<it->first<<" "<<pt->first<<endl;
                //cout<<iska<<" "<<uska<<endl;
                if(findLast(it->first) == findLast(pt->first))
                {
                    //cout<<"ghusa"<<endl;
                    other.push_back(make_pair(it->first, pt->first));
                    auto gt = vow.find(it->first);
                    if(gt!=vow.end())
                        vow.erase(gt);
                    gt = vow.find(pt->first);
                    if(gt!=vow.end())
                        vow.erase(gt);
                    break;
                }
            }
        }
        if(vow.size() == 0) break;
    }
    for(auto it=vow.begin(); it!=vow.end(); it++)
    {
        for(auto pt=vow.begin(); pt!= vow.end(); pt++)
        {
            if(it == pt)
                continue;
            if(it->second == pt->second)
            {
                that.push_back(make_pair(it->first, pt->first));
                vow.erase(it->first);
                vow.erase(pt->first);
                break;
            }
        }
        if(vow.size() == 0) break;
    }

    /*cout<<"Other"<<endl;
    for(auto &x: other)
        cout<<x.first<<", "<<x.second<<endl;
    cout<<"That"<<endl;
    for(auto &x: that)
        cout<<x.first<<", "<<x.second<<endl;*/

    //cout<<"ans nhi aaya"<<endl;
    int ans;
    if(other.size() == 0)
    {
        cout<<"0"<<endl;
        exit(0);
    }
    if(other.size() > that.size())
    {
        ans = (other.size() + that.size() )/ 2;
        cout<<ans<<endl;
        for(int i=0; i<ans; i++)
        {
            cout<<that[0].first<<" "<<other[0].first<<endl;
            cout<<that[0].second<<" "<<that[0].second<<endl;
        }
    }
    else if(other.size() <= that.size())
    {
        ans = that.size();
        cout<<ans<<endl;
        for(int i=0; i<ans; i++)
        {
            cout<<that[0].first<<" "<<other[0].first<<endl;
            cout<<that[0].second<<" "<<that[0].second<<endl;
        }
    }

    return 0;
}


#include<bits/stdc++.h>
using namespace std;

char findLast(string str)
{
    reverse(str.begin(), str.end());
    for(auto it=str.begin(); it!=str.end(); it++)
    {
        if(*it == 'a' || *it == 'e' || *it == 'i' || *it == 'o' || *it == 'u')
            return *it;
    }
}

int main()
{
    int n;
    cin>>n;

    map<string, int> vow;
    map<string, int> cnt;
    vector<pair<string, string>> other;
    vector<pair<string, string>> that;
    string s;
    for(int i=0; i<n; i++)
    {
        cin>>s;
        if(vow.find(s) != vow.end())
            cnt[s]++;
        else
            cnt[s] = 1;
        int c = 0;
        if(vow.find(s) == vow.end())
        {
            for(auto it=s.begin(); it!=s.end(); it++)
            {
                if(*it == 'a' || *it == 'e' || *it == 'i' || *it == 'o' || *it == 'u')
                    c++;
            }
            vow[s] = c;
        }
    }

    for(auto it=cnt.begin(); it!= cnt.end(); it++)
    {
        s = it->first;
        if(cnt[s] > 1)
        {
            if(cnt[s]%2 == 0)
            {
                while(cnt[s]>0)
                {
                    other.push_back(make_pair(s, s));
                    cnt[s] = cnt[s]-2;
                }
                auto gt = cnt.find(s);
                if(gt!=cnt.end())
                    cnt.erase(s);
                gt = vow.find(s);
                if(gt!=vow.end())
                    vow.erase(s);
            }
            else
            {
                while(cnt[s] > 1)
                {
                    other.push_back(make_pair(s, s));
                    cnt[s] = cnt[s]-2;
                }
            }
        }
        if(cnt.size() == 0)
            break;
    }

    auto it=vow.begin();
    while(it!=vow.end())
    {
        auto temp = vow.end();
        auto pt = vow.end();
        for(pt=vow.begin()++; pt!= vow.end(); pt++)
        {
            if(it == pt)
                continue;
            if(it->second == pt->second)
            {
                if(findLast(it->first) == findLast(pt->first))
                {
                    other.push_back(make_pair(it->first, pt->first));
                    it++;
                    temp = it;
                    if(it == pt)
                    {
                        pt++;
                        temp = pt;
                        pt--;
                    }
                    it--;
                    auto gt = vow.find(it->first);
                    if(gt!=vow.end())
                        vow.erase(it->first);

                    gt = vow.find(pt->first);
                    if(gt!=vow.end())
                        vow.erase(pt->first);
                    it = temp;
                    break;
                }
            }
        }
        if(pt==vow.end())
            it++;
        if(vow.size() <= 1)
            break;
    }
    for(auto it=vow.begin(); it!=vow.end(); it++)
    {
        for(auto pt=vow.begin(); pt!= vow.end(); pt++)
        {
            if(it == pt)
                continue;
            if(it->second == pt->second)
            {
                that.push_back(make_pair(it->first, pt->first));
                vow.erase(it->first);
                vow.erase(pt->first);
                break;
            }
        }
        if(vow.size() == 0) break;
    }

    int ans;
    if(other.size() == 0)
    {
        cout<<"0"<<endl;
        exit(0);
    }
    if(other.size() > that.size())
    {
        ans = (other.size() + that.size() )/ 2;
        int rem = ans-that.size();
        cout<<ans<<endl;
        if(ans>24000) cout<<"Here";
        auto it = other.begin();
        auto pt = that.begin();
        for(int i=0; i<that.size(); i++)
        {
            cout<<pt->first<<" "<<it->first<<endl;
            cout<<pt->second<<" "<<it->second<<endl;
            it++;
            pt++;
        }
        for(int i=0; i<rem; i++)
        {
            it++;
            auto gt = it;
            it--;
            cout<<gt->first<<" "<<it->first<<endl;
            cout<<gt->second<<" "<<it->second<<endl;
            it++;
            it++;
        }
    }
    else if(other.size() <= that.size())
    {
        ans = that.size();
        cout<<ans<<endl;
        if(ans>24000) cout<<"THere";
        auto it = that.begin();
        auto pt = other.begin();
        for(int i=0; i<ans; i++)
        {
            cout<<it->first<<" "<<pt->first<<endl;
            cout<<it->second<<" "<<pt->second<<endl;
            it++;
            pt++;
        }
    }

    return 0;
}


#include<bits/stdc++.h>
using namespace std;

char findLast(string str)
{
    reverse(str.begin(), str.end());
    for(auto it=str.begin(); it!=str.end(); it++)
    {
        if(*it == 'a' || *it == 'e' || *it == 'i' || *it == 'o' || *it == 'u')
            return *it;
    }
}

int main()
{
    int n;
    cin>>n;

    map<string, int> vow;
    map<string, int> cnt;
    vector<pair<string, string>> other;
    vector<pair<string, string>> that;
    string s;
    for(int i=0; i<n; i++)
    {
        cin>>s;
        if(vow.find(s) != vow.end())
            cnt[s]++;
        else
            cnt[s] = 1;
        int c = 0;
        if(vow.find(s) == vow.end())
        {
            for(auto it=s.begin(); it!=s.end(); it++)
            {
                if(*it == 'a' || *it == 'e' || *it == 'i' || *it == 'o' || *it == 'u')
                    c++;
            }
            vow[s] = c;
        }
    }

    auto it=cnt.begin();
    auto temp= cnt.begin();
    while(it!= cnt.end())
    {
        it++;
        temp = it;
        it--;
        s = it->first;
        if(cnt[s] > 1)
        {
            if(cnt[s]%2 == 0)
            {
                while(cnt[s]>0)
                {
                    other.push_back(make_pair(s, s));
                    cnt[s] = cnt[s]-2;
                }
                auto gt = cnt.find(s);
                if(gt == temp)
                    temp++;
                if(gt!=cnt.end())
                    cnt.erase(s);
                gt = vow.find(s);
                if(gt!=vow.end())
                    vow.erase(s);
            }
            else
            {
                while(cnt[s] > 1)
                {
                    other.push_back(make_pair(s, s));
                    cnt[s] = cnt[s]-2;
                }
            }
        }
        it = temp;
        if(cnt.size() == 0)
            break;
    }

    it=vow.begin();
    while(it!=vow.end())
    {
        auto temp = vow.end();
        auto pt = vow.end();
        for(pt=vow.begin()++; pt!= vow.end(); pt++)
        {
            if(it == pt)
                continue;
            if(it->second == pt->second)
            {
                if(findLast(it->first) == findLast(pt->first))
                {
                    other.push_back(make_pair(it->first, pt->first));
                    it++;
                    temp = it;
                    if(it == pt)
                    {
                        pt++;
                        temp = pt;
                        pt--;
                    }
                    it--;
                    auto gt = vow.find(it->first);
                    if(gt!=vow.end())
                        vow.erase(it->first);

                    gt = vow.find(pt->first);
                    if(gt!=vow.end())
                        vow.erase(pt->first);
                    it = temp;
                    break;
                }
            }
        }
        if(pt==vow.end())
            it++;
        if(vow.size() <= 1)
            break;
    }
    it=vow.begin();
    while(it!=vow.end())
    {
        auto temp = vow.end();
        auto pt = vow.end();
        for(pt=vow.begin(); pt!= vow.end(); pt++)
        {
            if(it == pt)
                continue;
            if(it->second == pt->second)
            {
                that.push_back(make_pair(it->first, pt->first));
                it++;
                temp = it;
                if(it == pt)
                {
                    pt++;
                    temp = pt;
                    pt--;
                }
                it--;
                vow.erase(it->first);
                vow.erase(pt->first);
                it = temp;
                break;
            }
        }
        if(pt==vow.end())
            it++;
        if(vow.size() == 0) break;
    }

    int ans;
    if(other.size() == 0)
    {
        cout<<"0"<<endl;
        exit(0);
    }
    if(other.size() > that.size())
    {
        ans = (other.size() + that.size() )/ 2;
        int rem = ans-that.size();
        cout<<ans<<endl;
        auto it = other.begin();
        auto pt = that.begin();
        for(int i=0; i<that.size(); i++)
        {
            cout<<pt->first<<" "<<it->first<<endl;
            cout<<pt->second<<" "<<it->second<<endl;
            it++;
            pt++;
        }
        vector<pair<string, string>>::reverse_iterator gt;
        gt = other.rbegin();
        for(int i=0; i<rem; i++)
        {
            cout<<gt->first<<" "<<it->first<<endl;
            cout<<gt->second<<" "<<it->second<<endl;
            it++;
            gt++;
        }
    }
    else if(other.size() <= that.size())
    {
        ans = other.size();
        cout<<ans<<endl;
        auto it = that.begin();
        auto pt = other.begin();
        for(int i=0; i<ans; i++)
        {
            cout<<it->first<<" "<<pt->first<<endl;
            cout<<it->second<<" "<<pt->second<<endl;
            it++;
            pt++;
        }
    }

    return 0;
}


#include<bits/stdc++.h>
using namespace std;

char findLast(string str)
{
    reverse(str.begin(), str.end());
    for(auto it=str.begin(); it!=str.end(); it++)
    {
        if(*it == 'a' || *it == 'e' || *it == 'i' || *it == 'o' || *it == 'u')
            return *it;
    }
}

int main()
{
    int n;
    cin>>n;

    map<string, int> vow;
    map<string, int> cnt;
    vector<pair<string, string>> other;
    vector<pair<string, string>> that;
    string s;
    for(int i=0; i<n; i++)
    {
        cin>>s;
        if(vow.find(s) != vow.end())
            cnt[s]++;
        else
            cnt[s] = 1;
        int c = 0;
        if(vow.find(s) == vow.end())
        {
            for(auto it=s.begin(); it!=s.end(); it++)
            {
                if(*it == 'a' || *it == 'e' || *it == 'i' || *it == 'o' || *it == 'u')
                    c++;
            }
            vow[s] = c;
        }
    }

    /*for(auto &x: cnt)
        cout<<x.first<<" "<<x.second<<endl;
    for(auto &x:vow)
        cout<<x.first<<" "<<x.second<<endl;*/

    for(auto it=cnt.begin(); it!= cnt.end(); it++)
    {
        s = it->first;
        if(cnt[s] > 1)
        {
            if(cnt[s]%2 == 0)
            {
                while(cnt[s]>0)
                {
                    other.push_back(make_pair(s, s));
                    cnt[s] = cnt[s]-2;
                }
                auto gt = cnt.find(s);
                if(gt!=cnt.end())
                    cnt.erase(s);
                gt = vow.find(s);
                if(gt!=vow.end())
                    vow.erase(s);
            }
            else
            {
                while(cnt[s] > 1)
                {
                    other.push_back(make_pair(s, s));
                    cnt[s] = cnt[s]-2;
                }
            }
        }
        if(cnt.size() == 0)
            break;
    }

    for(auto it=vow.begin(); it!=vow.end(); ++it)
    {
        for(auto pt=vow.begin(); pt!= vow.end(); ++pt)
        {
            if(it == pt)
                continue;
            if(it->second == pt->second)
            {
                char iska = findLast(it->first);
                char uska = findLast(pt->first);
                //cout<<it->first<<" "<<pt->first<<endl;
                //cout<<iska<<" "<<uska<<endl;
                if(findLast(it->first) == findLast(pt->first))
                {
                    //cout<<"ghusa"<<endl;
                    other.push_back(make_pair(it->first, pt->first));
                    auto gt = vow.find(it->first);
                    if(gt!=vow.end())
                        vow.erase(gt);
                    gt = vow.find(pt->first);
                    if(gt!=vow.end())
                        vow.erase(gt);
                    break;
                }
            }
        }
        if(vow.size() == 0) break;
    }
    for(auto it=vow.begin(); it!=vow.end(); it++)
    {
        for(auto pt=vow.begin(); pt!= vow.end(); pt++)
        {
            if(it == pt)
                continue;
            if(it->second == pt->second)
            {
                that.push_back(make_pair(it->first, pt->first));
                vow.erase(it->first);
                vow.erase(pt->first);
                break;
            }
        }
        if(vow.size() == 0) break;
    }

    /*cout<<"Other"<<endl;
    for(auto &x: other)
        cout<<x.first<<" "<<x.second<<endl;
    cout<<"That"<<endl;
    for(auto &x: that)
        cout<<x.first<<" "<<x.second<<endl;*/

    int ans;
    if(other.size() == 0)
    {
        cout<<"0"<<endl;
        exit(0);
    }
    if(other.size() > that.size())
    {
        ans = (other.size() + that.size() )/ 2;
        int rem = ans-that.size();
        cout<<ans<<endl;
        auto it = other.begin();
        auto pt = that.begin();
        for(int i=0; i<that.size(); i++)
        {
            cout<<pt->first<<" "<<it->first<<endl;
            cout<<pt->second<<" "<<it->second<<endl;
            it++;
            pt++;
        }
        auto gt = other.rbegin();
        for(int i=0; i<rem; i++)
        {
            cout<<gt->first<<" "<<it->first<<endl;
            cout<<gt->second<<" "<<it->second<<endl;
            it++;
            gt--;
        }
    }
    else if(other.size() <= that.size())
    {
        ans = that.size();
        cout<<ans<<endl;
        auto it = that.begin();
        auto pt = other.begin();
        for(int i=0; i<ans; i++)
        {
            cout<<it->first<<" "<<pt->first<<endl;
            cout<<it->second<<" "<<pt->second<<endl;
            it++;
            pt++;
        }
    }

    return 0;
}


#include<bits/stdc++.h>
using namespace std;

char findLast(string str)
{
    reverse(str.begin(), str.end());
    for(auto it=str.begin(); it!=str.end(); it++)
    {
        if(*it == 'a' || *it == 'e' || *it == 'i' || *it == 'o' || *it == 'u')
            return *it;
    }
}

int main()
{
    int n;
    cin>>n;

    map<string, int> vow;
    map<string, int> cnt;
    vector<pair<string, string>> other;
    vector<pair<string, string>> that;
    string s;
    for(int i=0; i<n; i++)
    {
        cin>>s;
        if(vow.find(s) != vow.end())
            cnt[s]++;
        else
            cnt[s] = 1;
        int c = 0;
        if(vow.find(s) == vow.end())
        {
            for(auto it=s.begin(); it!=s.end(); it++)
            {
                if(*it == 'a' || *it == 'e' || *it == 'i' || *it == 'o' || *it == 'u')
                    c++;
            }
            vow[s] = c;
        }
    }

    for(auto it=cnt.begin(); it!= cnt.end(); it++)
    {
        s = it->first;
        if(cnt[s] > 1)
        {
            if(cnt[s]%2 == 0)
            {
                while(cnt[s])
                {
                    other.push_back(make_pair(s, s));
                    cnt[s] = cnt[s]-2;
                }
                cnt.erase(s);
                vow.erase(s);
            }
            else
            {
                while(cnt[s] > 1)
                {
                    other.push_back(make_pair(s, s));
                    cnt[s] = cnt[s]-2;
                }
            }
        }
    }

    for(auto it=vow.begin(); it!=vow.end(); ++it)
    {
        for(auto pt=vow.begin(); pt!= vow.end(); ++pt)
        {
            if(it == pt)
                continue;
            if(it->second == pt->second)
            {
                //char iska = findLast(it->first);
                //char uska = findLast(pt->first);
                //cout<<it->first<<" "<<pt->first<<endl;
                //cout<<iska<<" "<<uska<<endl;
                if(findLast(it->first) == findLast(pt->first))
                {
                    //cout<<"ghusa"<<endl;
                    other.push_back(make_pair(it->first, pt->first));
                    auto gt = vow.find(it->first);
                    if(gt!=vow.end())
                        vow.erase(gt);
                    gt = vow.find(pt->first);
                    if(gt!=vow.end())
                        vow.erase(gt);
                    break;
                }
            }
        }
        if(vow.size() == 0) break;
    }
    for(auto it=vow.begin(); it!=vow.end(); it++)
    {
        for(auto pt=vow.begin(); pt!= vow.end(); pt++)
        {
            if(it == pt)
                continue;
            if(it->second == pt->second)
            {
                that.push_back(make_pair(it->first, pt->first));
                vow.erase(it->first);
                vow.erase(pt->first);
                break;
            }
        }
        if(vow.size() == 0) break;
    }

    int ans;
    if(other.size() == 0)
    {
        cout<<"0"<<endl;
        exit(0);
    }
    if(other.size() > that.size())
    {
        ans = (other.size() + that.size() )/ 2;
        int rem = ans-that.size();
        cout<<ans<<endl;
        auto it = other.begin();
        auto pt = that.begin();
        for(int i=0; i<=that.size(); i++)
        {
            cout<<pt->first<<" "<<it->first<<endl;
            cout<<pt->second<<" "<<it->second<<endl;
            it++;
            pt++;
            i++;
        }
        auto gt = other.rbegin();
        for(int i=0; i<rem; i++)
        {
            cout<<gt->first<<" "<<it->first<<endl;
            cout<<gt->second<<" "<<it->second<<endl;
            it++;
            gt--;
        }
    }
    else if(other.size() <= that.size())
    {
        ans = that.size();
        cout<<ans<<endl;
        for(int i=0; i<ans; i++)
        {
            cout<<that[0].first<<" "<<other[0].first<<endl;
            cout<<that[0].second<<" "<<that[0].second<<endl;
        }
    }

    return 0;
}


#include<bits/stdc++.h>
using namespace std;

char findLast(string str)
{
    reverse(str.begin(), str.end());
    for(auto it=str.begin(); it!=str.end(); it++)
    {
        if(*it == 'a' || *it == 'e' || *it == 'i' || *it == 'o' || *it == 'u')
            return *it;
    }
}

int main()
{
    int n;
    cin>>n;

    map<string, int> vow;
    map<string, int> cnt;
    vector<pair<string, string>> other;
    vector<pair<string, string>> that;
    string s;
    for(int i=0; i<n; i++)
    {
        cin>>s;
        if(vow.find(s) != vow.end())
            cnt[s]++;
        else
            cnt[s] = 1;
        int c = 0;
        if(vow.find(s) == vow.end())
        {
            for(auto it=s.begin(); it!=s.end(); it++)
            {
                if(*it == 'a' || *it == 'e' || *it == 'i' || *it == 'o' || *it == 'u')
                    c++;
            }
            vow[s] = c;
        }
    }

    for(auto it=cnt.begin(); it!= cnt.end(); it++)
    {
        s = it->first;
        if(cnt[s] > 1)
        {
            if(cnt[s]%2 == 0)
            {
                while(cnt[s]>0)
                {
                    other.push_back(make_pair(s, s));
                    cnt[s] = cnt[s]-2;
                }
                auto gt = cnt.find(s);
                if(gt!=cnt.end())
                    cnt.erase(s);
                gt = vow.find(s);
                if(gt!=vow.end())
                    vow.erase(s);
            }
            else
            {
                while(cnt[s] > 1)
                {
                    other.push_back(make_pair(s, s));
                    cnt[s] = cnt[s]-2;
                }
            }
        }
        if(cnt.size() == 0)
            break;
    }

    auto it=vow.begin();
    while(it!=vow.end())
    {
        auto temp = vow.end();
        auto pt = vow.end();
        for(pt=vow.begin()++; pt!= vow.end(); pt++)
        {
            if(it == pt)
                continue;
            if(it->second == pt->second)
            {
                if(findLast(it->first) == findLast(pt->first))
                {
                    other.push_back(make_pair(it->first, pt->first));
                    it++;
                    temp = it;
                    if(it == pt)
                    {
                        pt++;
                        temp = pt;
                        pt--;
                    }
                    it--;
                    auto gt = vow.find(it->first);
                    if(gt!=vow.end())
                        vow.erase(it->first);

                    gt = vow.find(pt->first);
                    if(gt!=vow.end())
                        vow.erase(pt->first);
                    it = temp;
                    break;
                }
            }
        }
        if(pt==vow.end())
            it++;
        if(vow.size() <= 1)
            break;
    }
    for(auto it=vow.begin(); it!=vow.end(); it++)
    {
        for(auto pt=vow.begin(); pt!= vow.end(); pt++)
        {
            if(it == pt)
                continue;
            if(it->second == pt->second)
            {
                that.push_back(make_pair(it->first, pt->first));
                vow.erase(it->first);
                vow.erase(pt->first);
                break;
            }
        }
        if(vow.size() == 0) break;
    }

    int ans;
    if(other.size() == 0)
    {
        cout<<"0"<<endl;
        exit(0);
    }
    if(other.size() > that.size())
    {
        ans = (other.size() + that.size() )/ 2;
        int rem = ans-that.size();
        cout<<ans<<endl;
        auto it = other.begin();
        auto pt = that.begin();
        for(int i=0; i<that.size(); i++)
        {
            cout<<pt->first<<" "<<it->first<<endl;
            cout<<pt->second<<" "<<it->second<<endl;
            it++;
            pt++;
        }
        for(int i=0; i<rem; i++)
        {
            it++;
            auto gt = it;
            it--;
            cout<<gt->first<<" "<<it->first<<endl;
            cout<<gt->second<<" "<<it->second<<endl;
            it++;
            it++;
        }
    }
    else if(other.size() <= that.size())
    {
        ans = that.size();
        cout<<ans<<endl;
        auto it = that.begin();
        auto pt = other.begin();
        for(int i=0; i<ans; i++)
        {
            cout<<it->first<<" "<<pt->first<<endl;
            cout<<it->second<<" "<<pt->second<<endl;
            it++;
            pt++;
        }
    }

    return 0;
}


#include<bits/stdc++.h>
using namespace std;

char findLast(string str)
{
    reverse(str.begin(), str.end());
    for(auto it=str.begin(); it!=str.end(); it++)
    {
        if(*it == 'a' || *it == 'e' || *it == 'i' || *it == 'o' || *it == 'u')
            return *it;
    }
}

int main()
{
    int n;
    cin>>n;

    map<string, int> vow;
    map<string, int> cnt;
    vector<pair<string, string>> other;
    vector<pair<string, string>> that;
    string s;
    for(int i=0; i<n; i++)
    {
        cin>>s;
        if(vow.find(s) != vow.end())
            cnt[s]++;
        else
            cnt[s] = 1;
        int c = 0;
        if(vow.find(s) == vow.end())
        {
            for(auto it=s.begin(); it!=s.end(); it++)
            {
                if(*it == 'a' || *it == 'e' || *it == 'i' || *it == 'o' || *it == 'u')
                    c++;
            }
            vow[s] = c;
        }
    }

    auto it=cnt.begin();
    auto temp= cnt.begin();
    while(it!= cnt.end())
    {
        it++;
        temp = it;
        it--;
        s = it->first;
        if(cnt[s] > 1)
        {
            if(cnt[s]%2 == 0)
            {
                while(cnt[s]>0)
                {
                    other.push_back(make_pair(s, s));
                    cnt[s] = cnt[s]-2;
                }
                auto gt = cnt.find(s);
                if(gt == temp)
                    temp++;
                if(gt!=cnt.end())
                    cnt.erase(s);
                gt = vow.find(s);
                if(gt!=vow.end())
                    vow.erase(s);
            }
            else
            {
                while(cnt[s] > 1)
                {
                    other.push_back(make_pair(s, s));
                    cnt[s] = cnt[s]-2;
                }
            }
        }
        it = temp;
        if(cnt.size() == 0)
            break;
    }

    it=vow.begin();
    while(it!=vow.end())
    {
        auto temp = vow.end();
        auto pt = vow.end();
        for(pt=vow.begin()++; pt!= vow.end(); pt++)
        {
            if(it == pt)
                continue;
            if(it->second == pt->second)
            {
                if(findLast(it->first) == findLast(pt->first))
                {
                    other.push_back(make_pair(it->first, pt->first));
                    it++;
                    temp = it;
                    if(it == pt)
                    {
                        pt++;
                        temp = pt;
                        pt--;
                    }
                    it--;
                    auto gt = vow.find(it->first);
                    if(gt!=vow.end())
                        vow.erase(it->first);

                    gt = vow.find(pt->first);
                    if(gt!=vow.end())
                        vow.erase(pt->first);
                    it = temp;
                    break;
                }
            }
        }
        if(pt==vow.end())
            it++;
        if(vow.size() <= 1)
            break;
    }
    it=vow.begin();
    while(it!=vow.end())
    {
        auto temp = vow.end();
        auto pt = vow.end();
        for(pt=vow.begin(); pt!= vow.end(); pt++)
        {
            if(it == pt)
                continue;
            if(it->second == pt->second)
            {
                that.push_back(make_pair(it->first, pt->first));
                it++;
                temp = it;
                if(it == pt)
                {
                    pt++;
                    temp = pt;
                    pt--;
                }
                it--;
                vow.erase(it->first);
                vow.erase(pt->first);
                it = temp;
                break;
            }
        }
        if(pt==vow.end())
            it++;
        if(vow.size() == 0) break;
    }

    int ans;
    if(other.size() == 0)
    {
        cout<<"0"<<endl;
        exit(0);
    }
    if(other.size() > that.size())
    {
        ans = (other.size() + that.size() )/ 2;
        int rem = ans-that.size();
        cout<<ans<<endl;
        auto it = other.begin();
        auto pt = that.begin();
        for(int i=0; i<that.size(); i++)
        {
            cout<<pt->first<<" "<<it->first<<endl;
            cout<<pt->second<<" "<<it->second<<endl;
            it++;
            pt++;
        }
        vector<pair<string, string>>::reverse_iterator gt;
        gt = other.rbegin();
        for(int i=0; i<rem; i++)
        {
            cout<<gt->first<<" "<<it->first<<endl;
            cout<<gt->second<<" "<<it->second<<endl;
            it++;
            gt++;
        }
    }
    else if(other.size() <= that.size())
    {
        ans = that.size();
        cout<<ans<<endl;
        auto it = that.begin();
        auto pt = other.begin();
        for(int i=0; i<ans; i++)
        {
            cout<<it->first<<" "<<pt->first<<endl;
            cout<<it->second<<" "<<pt->second<<endl;
            it++;
            pt++;
        }
    }

    return 0;
}


#include<bits/stdc++.h>
using namespace std;

int fun(string a, char &last)
{
	int cnt = 0;
	for(int i=0;i<a.size();i++)
		if(a[i]=='a' || a[i] == 'e' || a[i] == 'i' || a[i] == 'o' || a[i] == 'u')
			cnt++, last = a[i];
	return cnt;
}

int main()
{
	int t=1;
	//cin>>t;
	while(t--)
	{
		int n;
		char last;
		string str;
		cin>>n;
		vector<string> v, v2, v1;
		map<pair<int,char>, vector<string> >::iterator it;
		map<pair<int,char>, vector<string> > mp;
		for(int i=0;i<n;i++)
		{
			cin>>str;
			int tmp = fun(str,last);
			mp[make_pair(tmp, last)].push_back(str);
		}
		for(it=mp.begin(); it!=mp.end() ; it++)
		{
			for(int i=0 ; i<(it->second).size()-1 ; i+=2)
			{
				v.push_back((it->second)[i]);
				v.push_back((it->second)[i+1]);
			}
			if(it->second.size() % 2)
				v2.push_back(it->second[it->second.size()-1]);
		}
		for( int i=0 ; i<(int)v2.size()-1 ; i++ )
		{
			if(fun(v2[i],last) == fun(v2[i+1],last))
			{
				v1.push_back(v2[i]);
				v1.push_back(v2[i+1]);
				i++;
			}
		}
		if(n==1437)
		{
			for(int i=0;i<v1.size();i++)
				cout<<fun(v1[i],last)<<" ";
			cout<<endl;
		}
		int i=0, j=0;
		if( v.size() < 2 || v1.size()+v.size() < 4 )
			cout<<0<<endl;
		else
		{
			cout<<(v1.size()+v.size())/4<<endl;
			for( ; i<(int)v.size()-1 ; i+=2)
			{
				if( j<(int)v1.size()-1 )
				{
					cout<<v1[j]<<" "<<v[i]<<endl;
					cout<<v1[j+1]<<" "<<v[i+1]<<endl;
					j+=2;
				}
				else if((int)v.size()-i>=4)
				{
					cout<<v[i]<<" "<<v[i+3]<<endl;
					cout<<v[i+1]<<" "<<v[i+2]<<endl;
					i+=2;
				}
			}
		}
	}
	return 0;
}


#include<bits/stdc++.h>
using namespace std;

int fun(string a, char &last)
{
	int cnt = 0;
	for(int i=0;i<a.size();i++)
		if(a[i]=='a' || a[i] == 'e' || a[i] == 'i' || a[i] == 'o' || a[i] == 'u')
			cnt++, last = a[i];
	return cnt;
}

int main()
{
	int t;
	cin>>t;
	while(t--)
	{
		int n;
		char last;
		string str;
		cin>>n;
		vector<string> v, v2, v1;
		map<pair<int,char>, vector<string> >::iterator it;
		map<pair<int,char>, vector<string> > mp;
		for(int i=0;i<n;i++)
		{
			cin>>str;
			int tmp = fun(str,last);
			mp[make_pair(tmp, last)].push_back(str);
		}
		for(it=mp.begin(); it!=mp.end() ; it++)
		{
			for(int i=0 ; i<(it->second).size()-1 ; i+=2)
			{
				v.push_back((it->second)[i]);
				v.push_back((it->second)[i+1]);
				n+=2;
			}
			if(it->second.size() % 2)
				v2.push_back(it->second[it->second.size()-1]);
		}
		for( int i=0 ; i<(int)v2.size()-1 ; i++ )
		{
			if(fun(v2[i],last) == fun(v2[i+1],last))
			{
				v1.push_back(v2[i]);
				v1.push_back(v2[i+1]);
				i++;
			}
		}
		int i=0, j=0;
		if( v.size() < 2 || v1.size()+v.size() < 4 )
			cout<<0<<endl;
		else
		{
			cout<<(v1.size()+v.size())/4<<endl;
			for( ; i<(int)v.size()-1 ; i+=2)
			{
				if( j<(int)v1.size()-1 )
				{
					cout<<v1[j]<<" "<<v[i]<<endl;
					cout<<v1[j+1]<<" "<<v[i+1]<<endl;
					j+=2;
				}
				else if((int)v.size()-i>=4)
				{
					cout<<v[i]<<" "<<v[i+3]<<endl;
					cout<<v[i+1]<<" "<<v[i+2]<<endl;
					i+=2;
				}
			}
		}
	}
	return 0;
}


#include<bits/stdc++.h>
using namespace std;

int fun(string a, char &last)
{
	int cnt = 0;
	for(int i=0;i<a.size();i++)
		if(a[i]=='a' || a[i] == 'e' || a[i] == 'i' || a[i] == 'o' || a[i] == 'u')
			cnt++, last = a[i];
	return cnt;
}

int main()
{
	int t=1;
	//cin>>t;
	while(t--)
	{
		int n;
		char last;
		string str;
		cin>>n;
		vector<string> v, v2, v1;
		map<pair<int,char>, vector<string> >::iterator it;
		map<pair<int,char>, vector<string> > mp;
		for(int i=0;i<n;i++)
		{
			cin>>str;
			int tmp = fun(str,last);
			mp[make_pair(tmp, last)].push_back(str);
		}
		for(it=mp.begin(); it!=mp.end() ; it++)
		{
			for(int i=0 ; i<(it->second).size()-1 ; i+=2)
			{
				v.push_back((it->second)[i]);
				v.push_back((it->second)[i+1]);
				n+=2;
			}
			if(it->second.size() % 2)
				v2.push_back(it->second[it->second.size()-1]);
		}
		for( int i=0 ; i<(int)v2.size()-1 ; i++ )
		{
			if(fun(v2[i],last) == fun(v2[i+1],last))
			{
				v1.push_back(v2[i]);
				v1.push_back(v2[i+1]);
				i++;
			}
		}
		int i=0, j=0;
		if( v.size() < 2 || v1.size()+v.size() < 4 )
			cout<<0<<endl;
		else
		{
			cout<<(v1.size()+v.size())/4<<endl;
			for( ; i<(int)v.size()-1 ; i+=2)
			{
				if( j<(int)v1.size()-1 )
				{
					cout<<v1[j]<<" "<<v[i]<<endl;
					cout<<v1[j+1]<<" "<<v[i+1]<<endl;
					j+=2;
				}
				else if((int)v.size()-i>=4)
				{
					cout<<v[i]<<" "<<v[i+3]<<endl;
					cout<<v[i+1]<<" "<<v[i+2]<<endl;
					i+=2;
				}
			}
		}
	}
	return 0;
}


#include<bits/stdc++.h>
using namespace std;

int fun(string a, char &last)
{
	int cnt = 0;
	for(int i=0;i<a.size();i++)
		if(a[i]=='a' || a[i] == 'e' || a[i] == 'i' || a[i] == 'o' || a[i] == 'u')
			cnt++, last = a[i];
	return cnt;
}

int main()
{
	int t=1;
	//cin>>t;
	while(t--)
	{
		int n;
		char last;
		string str;
		cin>>n;
		vector<string> v, v2, v1;
		map<pair<int,char>, vector<string> >::iterator it;
		map<pair<int,char>, vector<string> > mp;
		for(int i=0;i<n;i++)
		{
			cin>>str;
			int tmp = fun(str,last);
			mp[make_pair(tmp, last)].push_back(str);
		}
		for(it=mp.begin(); it!=mp.end() ; it++)
		{
			for(int i=0 ; i<(it->second).size()-1 ; i+=2)
			{
				v.push_back((it->second)[i]);
				v.push_back((it->second)[i+1]);
			}
			if(it->second.size() % 2)
				v2.push_back(it->second[it->second.size()-1]);
		}
		for( int i=0 ; i<(int)v2.size()-1 ; i++ )
		{
			if(fun(v2[i],last) == fun(v2[i+1],last))
			{
				v1.push_back(v2[i]);
				v1.push_back(v2[i+1]);
				i++;
			}
		}
		if(n==1437)
		{
			for(int i=v1.size()-1;i>=0;i--)
				cout<<fun(v1[i],last)<<" ";
			cout<<endl;
		}
		int i=0, j=0;
		if( v.size() < 2 || v1.size()+v.size() < 4 )
			cout<<0<<endl;
		else
		{
			cout<<(v1.size()+v.size())/4<<endl;
			for( ; i<(int)v.size()-1 ; i+=2)
			{
				if( j<(int)v1.size()-1 )
				{
					cout<<v1[j]<<" "<<v[i]<<endl;
					cout<<v1[j+1]<<" "<<v[i+1]<<endl;
					j+=2;
				}
				else if((int)v.size()-i>=4)
				{
					cout<<v[i]<<" "<<v[i+3]<<endl;
					cout<<v[i+1]<<" "<<v[i+2]<<endl;
					i+=2;
				}
			}
		}
	}
	return 0;
}


#include<bits/stdc++.h>
using namespace std;

int fun(string a, char &last)
{
	int cnt = 0;
	for(int i=0;i<a.size();i++)
		if(a[i]=='a' || a[i] == 'e' || a[i] == 'i' || a[i] == 'o' || a[i] == 'u')
			cnt++, last = a[i];
	return cnt;
}

int main()
{
	int t=1;
	//cin>>t;
	while(t--)
	{
		int n;
		char last;
		string str;
		cin>>n;
		vector<string> v, v2, v1;
		map<pair<int,char>, vector<string> >::iterator it;
		map<pair<int,char>, vector<string> > mp;
		for(int i=0;i<n;i++)
		{
			cin>>str;
			int tmp = fun(str,last);
			mp[make_pair(tmp, last)].push_back(str);
		}
		for(it=mp.begin(); it!=mp.end() ; it++)
		{
			for(int i=0 ; i<(it->second).size()-1 ; i+=2)
			{
				v.push_back((it->second)[i]);
				v.push_back((it->second)[i+1]);
			}
			if(it->second.size() % 2)
				v2.push_back(it->second[it->second.size()-1]);
		}
		for( int i=0 ; i<(int)v2.size()-1 ; i++ )
		{
			if(fun(v2[i],last) == fun(v2[i+1],last))
			{
				v1.push_back(v2[i]);
				v1.push_back(v2[i+1]);
				i++;
			}
		}
		if(n==1437)
			cout<<v2.size()<<" "<<v.size()<<endl;
		int i=0, j=0;
		if( v.size() < 2 || v1.size()+v.size() < 4 )
			cout<<0<<endl;
		else
		{
			cout<<(v1.size()+v.size())/4<<endl;
			for( ; i<(int)v.size()-1 ; i+=2)
			{
				if( j<(int)v1.size()-1 )
				{
					cout<<v1[j]<<" "<<v[i]<<endl;
					cout<<v1[j+1]<<" "<<v[i+1]<<endl;
					j+=2;
				}
				else if((int)v.size()-i>=4)
				{
					cout<<v[i]<<" "<<v[i+3]<<endl;
					cout<<v[i+1]<<" "<<v[i+2]<<endl;
					i+=2;
				}
			}
		}
	}
	return 0;
}


#include<bits/stdc++.h>
using namespace std;

int fun(string a, char &last)
{
	int cnt = 0;
	for(int i=0;i<a.size();i++)
		if(a[i]=='a' || a[i] == 'e' || a[i] == 'i' || a[i] == 'o' || a[i] == 'u')
			cnt++, last = a[i];
	return cnt;
}

int main()
{
	int t=1;
	//cin>>t;
	while(t--)
	{
		int n;
		char last;
		string str;
		cin>>n;
		vector<string> v, v2, v1;
		map<pair<int,char>, vector<string> >::iterator it;
		map<pair<int,char>, vector<string> > mp;
		for(int i=0;i<n;i++)
		{
			cin>>str;
			int tmp = fun(str,last);
			mp[make_pair(tmp, last)].push_back(str);
		}
		for(it=mp.begin(); it!=mp.end() ; it++)
		{
			for(int i=0 ; i<(it->second).size()-1 ; i+=2)
			{
				v.push_back((it->second)[i]);
				v.push_back((it->second)[i+1]);
			}
			if(it->second.size() % 2)
				v2.push_back(it->second[it->second.size()-1]);
		}
		for( int i=0 ; i<(int)v2.size()-1 ; i++ )
		{
			if(fun(v2[i],last) == fun(v2[i+1],last))
			{
				v1.push_back(v2[i]);
				v1.push_back(v2[i+1]);
				i++;
			}
		}
		/*if(n==1437)
		{
			for(int i=v1.size()-1;i>=0;i--)
				cout<<fun(v1[i],last)<<" ";
			cout<<endl;
		}*/
		int i=0, j=0;
		if( v.size() < 2 || v1.size()+v.size() < 4 )
			cout<<0<<endl;
		else
		{
			if(v1.size() <= v.size())
				cout<<(v1.size()/2 + (v.size()-v1.size())/4)<<"\n";
			else
				cout<<v.size()/2<<endl;
			for( ; i<(int)v.size()-1 ; i+=2)
			{
				if( j<(int)v1.size()-1 )
				{
					cout<<v1[j]<<" "<<v[i]<<endl;
					cout<<v1[j+1]<<" "<<v[i+1]<<endl;
					j+=2;
				}
				else if((int)v.size()-i>=4)
				{
					cout<<v[i]<<" "<<v[i+3]<<endl;
					cout<<v[i+1]<<" "<<v[i+2]<<endl;
					i+=2;
				}
			}
		}
	}
	return 0;
}


#include<bits/stdc++.h>
using namespace std;

int fun(string a, char &last)
{
	int cnt = 0;
	for(int i=0;i<a.size();i++)
		if(a[i]=='a' || a[i] == 'e' || a[i] == 'i' || a[i] == 'o' || a[i] == 'u')
			cnt++, last = a[i];
	return cnt;
}

int main()
{
	int t=1;
	//cin>>t;
	while(t--)
	{
		int n;
		char last;
		string str;
		cin>>n;
		vector<string> v, v2, v1;
		map<pair<int,char>, vector<string> >::iterator it;
		map<pair<int,char>, vector<string> > mp;
		for(int i=0;i<n;i++)
		{
			cin>>str;
			int tmp = fun(str,last);
			mp[make_pair(tmp, last)].push_back(str);
		}
		for(it=mp.begin(); it!=mp.end() ; it++)
		{
			for(int i=0 ; i<(it->second).size()-1 ; i+=2)
			{
				v.push_back((it->second)[i]);
				v.push_back((it->second)[i+1]);
			}
			if(it->second.size() % 2)
				v2.push_back(it->second[it->second.size()-1]);
		}
		for( int i=0 ; i<(int)v2.size()-1 ; i++ )
		{
			if(fun(v2[i],last) == fun(v2[i+1],last))
			{
				v1.push_back(v2[i]);
				v1.push_back(v2[i+1]);
				i++;
			}
		}
		/*if(n==1437)
		{
			for(int i=v1.size()-1;i>=0;i--)
				cout<<fun(v1[i],last)<<" ";
			cout<<endl;
		}*/
		int i=0, j=0;
		if( v.size() < 2 || v1.size()+v.size() < 4 )
			cout<<0<<endl;
		else
		{
			if(v1.size() <= v.size())
				cout<<(v1.size()/2+(v.size()-v1.size()))/4<<"\n";
			else
				cout<<v.size()/2<<endl;
			for( ; i<(int)v.size()-1 ; i+=2)
			{
				if( j<(int)v1.size()-1 )
				{
					cout<<v1[j]<<" "<<v[i]<<endl;
					cout<<v1[j+1]<<" "<<v[i+1]<<endl;
					j+=2;
				}
				else if((int)v.size()-i>=4)
				{
					cout<<v[i]<<" "<<v[i+3]<<endl;
					cout<<v[i+1]<<" "<<v[i+2]<<endl;
					i+=2;
				}
			}
		}
	}
	return 0;
}


#include<bits/stdc++.h>
using namespace std;

int fun(string a, char &last)
{
	int cnt = 0;
	for(int i=0;i<a.size();i++)
		if(a[i]=='a' || a[i] == 'e' || a[i] == 'i' || a[i] == 'o' || a[i] == 'u')
			cnt++, last = a[i];
	return cnt;
}

int main()
{
	int t=1;
	//cin>>t;
	while(t--)
	{
		int n;
		char last;
		string str;
		cin>>n;
		vector<string> v, v2, v1;
		map<pair<int,char>, vector<string> >::iterator it;
		map<pair<int,char>, vector<string> > mp;
		for(int i=0;i<n;i++)
		{
			cin>>str;
			int tmp = fun(str,last);
			mp[make_pair(tmp, last)].push_back(str);
		}
		for(it=mp.begin(); it!=mp.end() ; it++)
		{
			for(int i=0 ; i<(it->second).size()-1 ; i+=2)
			{
				v.push_back((it->second)[i]);
				v.push_back((it->second)[i+1]);
			}
			if(it->second.size() % 2)
				v2.push_back(it->second[it->second.size()-1]);
		}
		//cout<<v2.size()+v.size()<<endl;
		for( int i=0 ; i<(int)v2.size()-1 ; i++ )
		{
			if(fun(v2[i],last) == fun(v2[i+1],last))
			{
				v1.push_back(v2[i]);
				v1.push_back(v2[i+1]);
				i++;
			}
		}
		int i=0, j=0;
		if( v.size() < 2 || v1.size()+v.size() < 4 )
			cout<<0<<endl;
		else
		{
			cout<<(v1.size()+v.size())/4<<endl;
			for( ; i<(int)v.size()-1 ; i+=2)
			{
				if( j<(int)v1.size()-1 )
				{
					cout<<v1[j]<<" "<<v[i]<<endl;
					cout<<v1[j+1]<<" "<<v[i+1]<<endl;
					j+=2;
				}
				else if((int)v.size()-i>=4)
				{
					cout<<v[i]<<" "<<v[i+3]<<endl;
					cout<<v[i+1]<<" "<<v[i+2]<<endl;
					i+=2;
				}
			}
		}
	}
	return 0;
}


#include<bits/stdc++.h>
using namespace std;

int fun(string a, char &last)
{
	int cnt = 0;
	for(int i=0;i<a.size();i++)
		if(a[i]=='a' || a[i] == 'e' || a[i] == 'i' || a[i] == 'o' || a[i] == 'u')
			cnt++, last = a[i];
	return cnt;
}

int main()
{
	int t=1;
	//cin>>t;
	while(t--)
	{
		int n;
		char last;
		string str;
		cin>>n;
		vector<string> v, v2, v1;
		map<pair<int,char>, vector<string> >::iterator it;
		map<pair<int,char>, vector<string> > mp;
		for(int i=0;i<n;i++)
		{
			cin>>str;
			int tmp = fun(str,last);
			mp[make_pair(tmp, last)].push_back(str);
		}
		for(it=mp.begin(); it!=mp.end() ; it++)
		{
			for(int i=0 ; i<(it->second).size()-1 ; i+=2)
			{
				v.push_back((it->second)[i]);
				v.push_back((it->second)[i+1]);
			}
			if(it->second.size() % 2)
				v2.push_back(it->second[it->second.size()-1]);
		}
		for( int i=0 ; i<(int)v2.size()-1 ; i++ )
		{
			if(fun(v2[i],last) == fun(v2[i+1],last))
			{
				v1.push_back(v2[i]);
				v1.push_back(v2[i+1]);
				i++;
			}
		}
		if(n==1437)
			cout<<v1.size()<<" "<<v.size()<<endl;
		int i=0, j=0;
		if( v.size() < 2 || v1.size()+v.size() < 4 )
			cout<<0<<endl;
		else
		{
			cout<<(v1.size()+v.size())/4<<endl;
			for( ; i<(int)v.size()-1 ; i+=2)
			{
				if( j<(int)v1.size()-1 )
				{
					cout<<v1[j]<<" "<<v[i]<<endl;
					cout<<v1[j+1]<<" "<<v[i+1]<<endl;
					j+=2;
				}
				else if((int)v.size()-i>=4)
				{
					cout<<v[i]<<" "<<v[i+3]<<endl;
					cout<<v[i+1]<<" "<<v[i+2]<<endl;
					i+=2;
				}
			}
		}
	}
	return 0;
}


#include<bits/stdc++.h>
using namespace std;

int fun(string a, char &last)
{
	int cnt = 0;
	for(int i=0;i<a.size();i++)
		if(a[i]=='a' || a[i] == 'e' || a[i] == 'i' || a[i] == 'o' || a[i] == 'u')
			cnt++, last = a[i];
	return cnt;
}

int main()
{
	int t=1;
	//cin>>t;
	while(t--)
	{
		int n;
		char last;
		string str;
		cin>>n;
		vector<string> v, v2, v1;
		map<pair<int,char>, vector<string> >::iterator it;
		map<pair<int,char>, vector<string> > mp;
		for(int i=0;i<n;i++)
		{
			cin>>str;
			int tmp = fun(str,last);
			mp[make_pair(tmp, last)].push_back(str);
		}
		for(it=mp.begin(); it!=mp.end() ; it++)
		{
			for(int i=0 ; i<(it->second).size()-1 ; i+=2)
			{
				v.push_back((it->second)[i]);
				v.push_back((it->second)[i+1]);
			}
			if(it->second.size() % 2)
				v2.push_back(it->second[it->second.size()-1]);
		}
		if(n==1437)
			cout<<v2.size()+v.size()<<endl;
		for( int i=0 ; i<(int)v2.size()-1 ; i++ )
		{
			if(fun(v2[i],last) == fun(v2[i+1],last))
			{
				v1.push_back(v2[i]);
				v1.push_back(v2[i+1]);
				i++;
			}
		}
		int i=0, j=0;
		if( v.size() < 2 || v1.size()+v.size() < 4 )
			cout<<0<<endl;
		else
		{
			cout<<(v1.size()+v.size())/4<<endl;
			for( ; i<(int)v.size()-1 ; i+=2)
			{
				if( j<(int)v1.size()-1 )
				{
					cout<<v1[j]<<" "<<v[i]<<endl;
					cout<<v1[j+1]<<" "<<v[i+1]<<endl;
					j+=2;
				}
				else if((int)v.size()-i>=4)
				{
					cout<<v[i]<<" "<<v[i+3]<<endl;
					cout<<v[i+1]<<" "<<v[i+2]<<endl;
					i+=2;
				}
			}
		}
	}
	return 0;
}


#include <bits/stdc++.h>
using namespace std;

vector<string> ss;
vector<pair<char, pair<long int, long int>>> arr;
vector<pair<long int, long int>> brr;
vector<pair<long int, long int>> crr;
vector<pair<long int, long int>> krr;

int main() {
  ios::sync_with_stdio(false);
 	cin.tie(0);
  long int n, i, j, cnt, cnt1 = 0; cin >> n;
  char a;
  string temp;

  for(i = 0; i < n; i ++) {
    cin >> temp;
    ss.push_back(temp);
    cnt = 0;
    for(j = 0; j < temp.length(); j ++) {
      if(temp[j] == 'a' || temp[j] == 'e' || temp[j] == 'i' || temp[j] == 'o' || temp[j] == 'u') {
        cnt ++;
        a = temp[j];
      }
    }
    arr.push_back({a, {cnt, i}});
  }

  cnt = 0;
  sort(arr.begin(), arr.end());
  for(i = 1; i < n; i ++) {
    if(arr[i].first == arr[i - 1].first && arr[i].second.first == arr[i - 1].second.first) {
      crr.push_back({arr[i - 1].second.second, arr[i].second.second});
      arr[i].first = arr[i - 1].first = arr[i].second.first = arr[i - 1].second.first = 0;
      cnt ++;
    }
  }

  for(i = 0; i < n; i ++) {
    if(arr[i].first != 0) {
      brr.push_back({arr[i].second.first, arr[i].second.second});
    }
  }

  sort(brr.begin(), brr.end());
  for(i = 1; i < brr.size(); i ++) {
    if(brr[i - 1].first == brr[i].first) {
      cnt1 ++;
      krr.push_back({brr[i - 1].second, brr[i].second});
      brr[i].first = 0;
    }
  }

  if(cnt > cnt1) {
    cout << cnt1 + (cnt - cnt1) / 2 << "\n";
    for( i = 0; i < cnt1; i ++) {
        cout << ss[krr[i].first] << " " << ss[crr[i].first] << "\n";
        cout << ss[krr[i].second] << " " << ss[crr[i].second] << "\n";
    }
    j = i;
    if((cnt - cnt1) / 2 >= 1) {
      for(; i + 1 < crr.size(); i += 2) {
          cout << ss[crr[i].first] << " " << ss[crr[i + 1].first] << "\n";
          cout << ss[crr[i].second] << " " << ss[crr[i + 1].second] << "\n";
      }
    }
  }
  else {
    cout << cnt << "\n";
    for( i = 0; i < cnt; i += 1) {
        cout << ss[krr[i].first] << " " << ss[crr[i].first] << "\n";
        cout << ss[krr[i].second] << " " << ss[crr[i].second] << "\n";
    }
  }

  return 0;
}


#include <bits/stdc++.h>
using namespace std;

vector<string> ss;
vector<pair<char, pair<long int, long int>>> arr;
vector<pair<long int, long int>> brr;
vector<pair<long int, long int>> crr;
vector<pair<long int, long int>> krr;

int main() {
  ios::sync_with_stdio(false);
 	cin.tie(0);
  long int n, i, j, cnt, cnt1 = 0; cin >> n;
  char a;
  string temp;

  for(i = 0; i < n; i ++) {
    cin >> temp;
    ss.push_back(temp);
    cnt = 0;
    for(j = 0; j < temp.length(); j ++) {
      if(temp[j] == 'a' || temp[j] == 'e' || temp[j] == 'i' || temp[j] == 'o' || temp[j] == 'u') {
        cnt ++;
        a = temp[j];
      }
    }
    arr.push_back({a, {cnt, i}});
  }

  cnt = 0;
  sort(arr.begin(), arr.end());
  for(i = 1; i < n; i ++) {
    if(arr[i].first == arr[i - 1].first && arr[i].second.first == arr[i - 1].second.first) {
      crr.push_back({arr[i - 1].second.second, arr[i].second.second});
      arr[i].first = arr[i - 1].first = arr[i].second.first = arr[i - 1].second.first = 0;
      cnt ++;
    }
  }

  for(i = 0; i < n; i ++) {
    if(arr[i].first != 0) {
      brr.push_back({arr[i].second.first, arr[i].second.second});
    }
  }

  sort(brr.begin(), brr.end());
  for(i = 1; i < brr.size(); i ++) {
    if(brr[i - 1].first == brr[i].first) {
      cnt1 ++;
      krr.push_back({brr[i - 1].second, brr[i].second});
      brr[i].first = 0;
    }
  }

  if(cnt > cnt1) {
    cout << cnt1 + (cnt - cnt1) / 2 << "\n";
    for( i = 0; i < cnt1; i ++) {
        cout << ss[krr[i].first] << " " << ss[crr[i].first] << "\n";
        cout << ss[krr[i].second] << " " << ss[crr[i].second] << "\n";
    }
    j = i;
    if((cnt - cnt1) / 2 >= 1) {
      for(; i + 1 < crr.size(); i += 2) {
          cout << ss[crr[i].first] << " " << ss[crr[i + 1].first] << "\n";
          cout << ss[crr[i].second] << " " << ss[crr[i + 1].second] << "\n";
      }
    }
  }
  else {
    cout << cnt;
    for( i = 0; i < cnt; i += 1) {
        cout << ss[krr[i].first] << " " << ss[crr[i].first] << "\n";
        cout << ss[krr[i].second] << " " << ss[crr[i].second] << "\n";
    }
  }

  return 0;
}


#include <bits/stdc++.h>
using namespace std;

int main() {
  int n, i, j, cnt, cnt1 = 0; cin >> n;
  string s[n], ss[n];
  vector<pair<char, pair<int, int>>> arr;
  vector<pair<int, int>> brr;
  vector<pair<int, int>> crr;
  vector<pair<int, int>> krr;
  char a;
  for(i = 0; i < n; i ++) {
    cin >> s[i];
    ss[i] = s[i];
    cnt = 0;
    for(j = 0; j < s[i].length(); j ++) {
      if(s[i][j] == 'a' || s[i][j] == 'e' || s[i][j] == 'i' || s[i][j] == 'o' || s[i][j] == 'u') {
        cnt ++;
        a = s[i][j];
      }
    }
    arr.push_back({a, {cnt, i}});
  }
  sort(arr.begin(), arr.end());
  cnt = 0;
  for(i = 1; i < n; i ++) {
    if(arr[i].first == arr[i - 1].first && arr[i].second.first == arr[i - 1].second.first) {
      // cout << arr[i].first << " " << arr[i].second << "\n";
      // cout << arr[i - 1].first << " " << arr[i - 1].second << "\n";
      crr.push_back({arr[i - 1].second.second, arr[i].second.second});
      arr[i].first = arr[i - 1].first = arr[i].second.first = arr[i - 1].second.first = 0;
      cnt ++;
    }
  }
  for(i = 0; i < n; i ++) {
    if(arr[i].first != 0) {
      // cout << arr[i].first << " " << arr[i].second << "\n";
      brr.push_back({arr[i].second.first, arr[i].second.second});
    }
  }
  sort(brr.begin(), brr.end());
  for(i = 1; i < brr.size(); i ++) {
    if(brr[i - 1].first == brr[i].first) {
      cnt1 ++;
      krr.push_back({brr[i - 1].second, brr[i].second});
      brr[i].first = 0;
    }
  }
  // cout << cnt << " " << cnt1 << "\n";
  if(cnt > cnt1) {
    cout << cnt1 + (cnt - cnt1) / 2 << "\n";
    for( i = 0; i < cnt1; i ++) {
        cout << ss[krr[i].first] << " " << ss[crr[i].first] << "\n";
        cout << ss[krr[i].second] << " " << ss[crr[i].second] << "\n";
    }
    j = i;
    if((cnt - cnt1) / 2 >= 1) {
      for(; i < j + (cnt - cnt1) / 2; i += 2) {
          cout << ss[crr[i].first] << " " << ss[crr[i + 1].first] << "\n";
          cout << ss[crr[i].second] << " " << ss[crr[i + 1].second] << "\n";
      }
    }
  }
  else {
    cout << cnt;
    for( i = 0; i < cnt; i += 1) {
        cout << ss[krr[i].first] << " " << ss[crr[i].first] << "\n";
        cout << ss[krr[i].second] << " " << ss[crr[i].second] << "\n";
    }
  }

  return 0;
}


#include <bits/stdc++.h>
using namespace std;

int main() {
  int n, i, j, cnt, cnt1 = 0; cin >> n;
  string s[n], ss[n];
  vector<pair<char, pair<int, int>>> arr;
  vector<pair<int, int>> brr;
  vector<pair<int, int>> crr;
  vector<pair<int, int>> krr;
  char a;
  for(i = 0; i < n; i ++) {
    cin >> s[i];
    ss[i] = s[i];
    cnt = 0;
    for(j = 0; j < s[i].length(); j ++) {
      if(s[i][j] == 'a' || s[i][j] == 'e' || s[i][j] == 'i' || s[i][j] == 'o' || s[i][j] == 'u') {
        cnt ++;
        a = s[i][j];
      }
    }
    arr.push_back({a, {cnt, i}});
  }
  sort(arr.begin(), arr.end());
  cnt = 0;
  for(i = 1; i < n; i ++) {
    if(arr[i].first == arr[i - 1].first && arr[i].second.first == arr[i - 1].second.first) {
      // cout << arr[i].first << " " << arr[i].second << "\n";
      // cout << arr[i - 1].first << " " << arr[i - 1].second << "\n";
      crr.push_back({arr[i - 1].second.second, arr[i].second.second});
      arr[i].first = arr[i - 1].first = arr[i].second.first = arr[i - 1].second.first = 0;
      cnt ++;
    }
  }
  for(i = 0; i < n; i ++) {
    if(arr[i].first != 0) {
      // cout << arr[i].first << " " << arr[i].second << "\n";
      brr.push_back({arr[i].second.first, arr[i].second.second});
    }
  }
  sort(brr.begin(), brr.end());
  for(i = 1; i < brr.size(); i ++) {
    if(brr[i - 1].first == brr[i].first) {
      cnt1 ++;
      krr.push_back({brr[i - 1].second, brr[i].second});
      brr[i].first = 0;
    }
  }
  // cout << cnt << " " << cnt1 << "\n";
  if(cnt > cnt1) {
    cout << cnt1 + (cnt - cnt1) / 2 << "\n";
    for( i = 0; i < cnt1; i ++) {
        cout << ss[krr[i].first] << " " << ss[crr[i].first] << "\n";
        cout << ss[krr[i].second] << " " << ss[crr[i].second] << "\n";
    }
    j = i;
    if((cnt - cnt1) / 2 >= 1) {
      for(; i < j + (cnt - cnt1) / 2 + 1; i ++) {
          cout << ss[crr[i].first] << " " << ss[crr[i].second] << "\n";
      }
    }
  }
  else {
    cout << cnt;
    for( i = 0; i < cnt; i ++) {
        cout << ss[krr[i].first] << " " << ss[crr[i].first] << "\n";
        cout << ss[krr[i].second] << " " << ss[crr[i].second] << "\n";
    }
  }

  return 0;
}


#include <bits/stdc++.h>
using namespace std;

int main() {
  int n, i, j, cnt, cnt1 = 0; cin >> n;
  vector<string> ss;
  vector<pair<char, pair<int, int>>> arr;
  vector<pair<int, int>> brr;
  vector<pair<int, int>> crr;
  vector<pair<int, int>> krr;
  char a;
  string temp;
  for(i = 0; i < n; i ++) {
    cin >> temp;
    ss.push_back(temp);
    cnt = 0;
    for(j = 0; j < temp.length(); j ++) {
      if(temp[j] == 'a' || temp[j] == 'e' || temp[j] == 'i' || temp[j] == 'o' || temp[j] == 'u') {
        cnt ++;
        a = temp[j];
      }
    }
    arr.push_back({a, {cnt, i}});
  }
  sort(arr.begin(), arr.end());
  cnt = 0;
  for(i = 1; i < n; i ++) {
    if(arr[i].first == arr[i - 1].first && arr[i].second.first == arr[i - 1].second.first) {
      // cout << arr[i].first << " " << arr[i].second << "\n";
      // cout << arr[i - 1].first << " " << arr[i - 1].second << "\n";
      crr.push_back({arr[i - 1].second.second, arr[i].second.second});
      arr[i].first = arr[i - 1].first = arr[i].second.first = arr[i - 1].second.first = 0;
      cnt ++;
    }
  }
  for(i = 0; i < n; i ++) {
    if(arr[i].first != 0) {
      // cout << arr[i].first << " " << arr[i].second << "\n";
      brr.push_back({arr[i].second.first, arr[i].second.second});
    }
  }
  sort(brr.begin(), brr.end());
  for(i = 1; i < brr.size(); i ++) {
    if(brr[i - 1].first == brr[i].first) {
      cnt1 ++;
      krr.push_back({brr[i - 1].second, brr[i].second});
      brr[i].first = 0;
    }
  }
  // cout << cnt << " " << cnt1 << "\n";
  if(cnt > cnt1) {
    cout << cnt1 + (cnt - cnt1) / 2 << "\n";
    for( i = 0; i < cnt1; i ++) {
        cout << ss[krr[i].first] << " " << ss[crr[i].first] << "\n";
        cout << ss[krr[i].second] << " " << ss[crr[i].second] << "\n";
    }
    j = i;
    if((cnt - cnt1) / 2 >= 1) {
      for(; i < j + (cnt - cnt1) / 2; i += 2) {
          cout << ss[crr[i].first] << " " << ss[crr[i + 1].first] << "\n";
          cout << ss[crr[i].second] << " " << ss[crr[i + 1].second] << "\n";
      }
    }
  }
  else {
    cout << cnt;
    for( i = 0; i < cnt; i += 1) {
        cout << ss[krr[i].first] << " " << ss[crr[i].first] << "\n";
        cout << ss[krr[i].second] << " " << ss[crr[i].second] << "\n";
    }
  }

  return 0;
}


#include <bits/stdc++.h>
using namespace std;

int main() {
  int n, i, j, cnt, cnt1 = 0; cin >> n;
  string s[n], ss[n];
  vector<pair<char, pair<int, int>>> arr;
  vector<pair<int, int>> brr;
  vector<pair<int, int>> crr;
  vector<pair<int, int>> krr;
  char a;
  for(i = 0; i < n; i ++) {
    cin >> s[i];
    ss[i] = s[i];
    cnt = 0;
    for(j = 0; j < s[i].length(); j ++) {
      if(s[i][j] == 'a' || s[i][j] == 'e' || s[i][j] == 'i' || s[i][j] == 'o' || s[i][j] == 'u') {
        cnt ++;
        a = s[i][j];
      }
    }
    arr.push_back({a, {cnt, i}});
  }
  sort(arr.begin(), arr.end());
  cnt = 0;
  for(i = 1; i < n; i ++) {
    if(arr[i].first == arr[i - 1].first && arr[i].second.first == arr[i - 1].second.first) {
      // cout << arr[i].first << " " << arr[i].second << "\n";
      // cout << arr[i - 1].first << " " << arr[i - 1].second << "\n";
      crr.push_back({arr[i - 1].second.second, arr[i].second.second});
      arr[i].first = arr[i - 1].first = arr[i].second.first = arr[i - 1].second.first = 0;
      cnt ++;
    }
  }
  for(i = 0; i < n; i ++) {
    if(arr[i].first != 0) {
      // cout << arr[i].first << " " << arr[i].second << "\n";
      brr.push_back({arr[i].second.first, arr[i].second.second});
    }
  }
  sort(brr.begin(), brr.end());
  for(i = 1; i < brr.size(); i ++) {
    if(brr[i - 1].first == brr[i].first) {
      cnt1 ++;
      krr.push_back({brr[i - 1].second, brr[i].second});
      brr[i].first = 0;
    }
  }
  // cout << cnt << " " << cnt1 << "\n";
  if(cnt > cnt1) {
    cout << cnt1 + (cnt - cnt1) / 2 << "\n";
    for( i = 0; i < cnt1; i ++) {
        cout << ss[krr[i].first] << " " << ss[crr[i].first] << "\n";
        cout << ss[krr[i].second] << " " << ss[crr[i].second] << "\n";
    }
    j = i;
    if((cnt - cnt1) / 2 >= 1) {
      for(; i < j + (cnt - cnt1) / 2; i += 2) {
          cout << ss[crr[i].first] << " " << ss[crr[i + 1].first] << "\n";
          cout << ss[crr[i].second] << " " << ss[crr[i + 1].second] << "\n";
      }
    }
  }
  else {
    cout << cnt;
    for( i = 0; i < cnt; i += 2) {
        cout << ss[krr[i].first] << " " << ss[crr[i].first] << "\n";
        cout << ss[krr[i].second] << " " << ss[crr[i].second] << "\n";
    }
  }

  return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define INF 0x3f3f3f3f
#define NINF -INF-1
#define ll long long
#define pi acos(-1.0)
#define mem(a,b) memset(a,b,sizeof(a))
#define lson rt<<1
#define rson rt<<1|1
const ll MAXN=2e6+7;
const ll mod=1e9+7;
struct node
{
    int sum;
    char b;
    string a;
}no[MAXN];
bool cmp(node x,node y)
{
    if(x.sum==y.sum)
        return x.b<y.b;
    return x.sum<y.sum;
}
vector<pair<int,int> >q,q1;
int main()
{
    int n;
    cin>>n;
    for(int i=1;i<=n;i++)
    {
        cin>>no[i].a;
        int len=no[i].a.size();
        for(int j=0;j<len;j++)
        {
            if(no[i].a[j]=='a')
                no[i].sum++,no[i].b=no[i].a[j];
            else if(no[i].a[j]=='e')
                no[i].sum++,no[i].b=no[i].a[j];
            else if(no[i].a[j]=='i')
                no[i].sum++,no[i].b=no[i].a[j];
            else if(no[i].a[j]=='o')
                no[i].sum++,no[i].b=no[i].a[j];
            else if(no[i].a[j]=='u')
                no[i].sum++,no[i].b=no[i].a[j];
        }
    }
    sort(no+1,no+n+1,cmp);
    int flag=-1,cnt=1;
    for(int i=1;i<=n;i++)
    {
        if(no[i].b==no[i+1].b&&no[i].sum==no[i+1].sum)
        {
            q.push_back(make_pair(i,i+1));
            i++;
        }
        else if(no[i].sum!=cnt)
        {
            flag=i;
            cnt=no[i].sum;
        }
        else if(flag==-1)
            flag=i;
        else
        {
            q1.push_back(make_pair(flag,i));
        }
    }
    int len=q.size(),len1=q1.size();
    int sum=min(len,len1);
    if(len>len1)
        cout<<sum+(len-len1)/2<<endl;
    else
        cout<<sum<<endl;
    for(int i=0;i<sum;i++)
    {
        cout<<no[q1[i].first].a<<" "<<no[q[i].first].a<<endl;
        cout<<no[q1[i].second].a<<" "<<no[q[i].second].a<<endl;
    }
    for(int i=sum;i<sum+(len-len1)/2;i++)
    {
        cout<<no[q[i].first].a<<" "<<no[q[i+1].first].a<<endl;
        cout<<no[q[i].second].a<<" "<<no[q[i+1].second].a<<endl;
        i++;
    }
}