// Cheese-Cracker: cheese-cracker.github.io

void solve(){
    long n = scan;
    dchar[][] arr;
    for(int i = 0; i < n-2; ++i){
        arr ~= scan!(dchar[]);
    }
    show(arr);
    dchar[] w;
    w ~= arr[0];
    bool f = 0;
    for(int i = 1; i < n - 2; ++i){
        if(w.back == arr[i][0]){
            w ~= arr[i][1];
        }else{
            f = 1;
            w ~= arr[i];
        }
    }
    if(!f){
        w ~= 'a';
    }
    writeln(w);
}

void main(){
    long tests = scan;        // Toggle!
    while(tests--) solve;
}

/**************    *****    That's All Folks!    *****    **************/
import std.stdio, std.range, std.conv, std.typecons, std.algorithm, std.container, std.math, std.numeric;
string[] tk; T scan(T=long)(){while(!tk.length)tk = readln.split; string a=tk.front; tk.popFront; return a.to!T;}
T[] scanArray(T=long)(){ auto r = readln.split.to!(T[]); return r; }
void show(A...)(A a){ debug{ foreach(t; a){stderr.write(t, "| ");} stderr.writeln; } }
alias ll = long, tup = Tuple!(long, "x",  long, "y");
