#include<iostream>
#include<stdio.h>
#include<string.h>
#include<cmath>
using namespace std;
int main()
{
int t;
char a[55],b[55],r[120];//b插入a中央
scanf("%d",&t);
while(t--)
{
scanf("%s%s",a,b);//可以用gets
int lena=strlen(a);
int lenb=strlen(b);
int i=0,j=0;
while(a[i]!='\0'&&i<lena/2)//确保要插入的位置<=要插入的字符串的长度
{
r[i]=a[i];
i++;
}
while(b[j]!='\0')
{
r[i+j]=b[j];
j++;
}
while(a[i]!='\0')//将剩余的字符串复制
{
r[i+j]=a[i];
i++;
}
r[i+j]='\0';
puts(r);
}
}
#include <stdio.h>
#include <string.h>
int main() {
int n;
scanf("%d\n",&n);
while (n--) {
char a[100],b[100];
int i,j;
gets(a);
gets(b);
int lena=(int)strlen(a),lenb=(int)strlen(b);
for (i=0; i<(lena/2); i++) {
printf("%c",a[i]);
}
for (j=0; j<lenb; j++) {
printf("%c",b[j]);
}
for (i=(lena/2); i<lena; i++) {
printf("%c",a[i]);
}
printf("\n");
}
return 0;
}