#include<stdio.h>
#include<stdlib.h>
#include"string.h"
#define maxsize 100
typedef struct
{
char name[10];
int sex;
}person;
typedef struct
{
person wom[maxsize];
int front;
int rear;
}wom;
typedef struct
{
person man[maxsize];
int front;
int rear;
}man;
void into(wom *w,man *m,person people[],int x)
{
int i;
for(i=1;i<x;i++)
{
if (people[i].sex=='B')
{
strcpy(m->man[m->rear].name,people[i].name);
m->man[m->rear].sex=people[i].sex;
m->rear=(m->rear+1)%maxsize;
}
else if(people[i].sex=='G')
{
strcpy(w->wom[w->rear].name,people[i].name);