description: Polycarp has come up with a new game to play with you. He calls it "A missing bigram".
  
  A bigram of a word is a sequence of two adjacent letters in it.
  
  For example, word "abbaaba" contains bigrams "ab", "bb", "ba", "aa", "ab" and "ba".
  
  The game goes as follows. First, Polycarp comes up with a word, consisting only of lowercase letters 'a' and 'b'. Then, he writes down all its bigrams on a whiteboard in the same order as they appear in the word. After that, he wipes one of them off the whiteboard.
  
  Finally, Polycarp invites you to guess what the word that he has come up with was.
  
  Your goal is to find any word such that it's possible to write down all its bigrams and remove one of them, so that the resulting sequence of bigrams is the same as the one Polycarp ended up with.
  
  The tests are generated in such a way that the answer exists. If there are multiple answers, you can print any of them.
  
  Input
  
  The first line contains a single integer t (1 ≤ t ≤ 2000) — the number of testcases.
  
  The first line of each testcase contains a single integer n (3 ≤ n ≤ 100) — the length of the word Polycarp has come up with.
  
  The second line of each testcase contains n-2 bigrams of that word, separated by a single space. Each bigram consists of two letters, each of them is either 'a' or 'b'.
  
  Additional constraint on the input: there exists at least one string such that it is possible to write down all its bigrams, except one, so that the resulting sequence is the same as the sequence in the input. In other words, the answer exists.
  
  Output
  
  For each testcase print a word, consisting of n letters, each of them should be either 'a' or 'b'. It should be possible to write down all its bigrams and remove one of them, so that the resulting sequence of bigrams is the same as the one Polycarp ended up with.
  
  The tests are generated in such a way that the answer exists. If there are multiple answers, you can print any of them. 
  
  Example
  
  Input
  
  
  4
  7
  ab bb ba aa ba
  7
  ab ba aa ab ba
  3
  aa
  5
  bb ab bb
  
  
  Output
  
  
  abbaaba
  abaabaa
  baa
  bbabb
  
  Note
  
  The first two testcases from the example are produced from the word "abbaaba". As listed in the statement, it contains bigrams "ab", "bb", "ba", "aa", "ab" and "ba".
  
  In the first testcase, the 5-th bigram is removed. 
  
  In the second testcase, the 2-nd bigram is removed. However, that sequence could also have been produced from the word "abaabaa". It contains bigrams "ab", "ba", "aa", "ab", "ba" and "aa". The missing bigram is the 6-th one.
  
  In the third testcase, all of "baa", "aab" and "aaa" are valid answers.
solution: import java.util.*;
  import java.io.*;
  
  public class _practise {
  	
  	static class FastReader
  	{ 
  		
  		BufferedReader br; 
  		StringTokenizer st; 
  
  		public FastReader() 
  		{ 
  			br = new BufferedReader(new InputStreamReader(System.in)); 
  		} 
  
  		String next() 
  		{ 
  			while (st == null || !st.hasMoreElements()) 
  			{ 
  				try
  				{ 
  					st = new StringTokenizer(br.readLine()); 
  				} 
  				catch (IOException  e) 
  				{ 
  					e.printStackTrace(); 
  				} 
  			} 
  			return st.nextToken(); 
  		} 
  
  		int nextInt() 
  		{ 
  			return Integer.parseInt(next()); 
  		} 
  
  		long nextLong() 
  		{ 
  			return Long.parseLong(next()); 
  		} 
  
  		double nextDouble() 
  		{ 
  			return Double.parseDouble(next()); 
  		} 
  
  		 int[] ia(int n)
  		{
  			int a[]=new int[n];
  			for(int i=0;i<n;i++)a[i]=nextInt();
  			return a;
  		}
  		 int[][] ia(int n , int m)
  			{
  				int a[][]=new int[n][m];
  				for(int i=0;i<n;i++) for(int j=0;j<m ;j++) a[i][j]=nextInt();
  				return a;
  			}
  		 long[][] la(int n , int m)
  			{
  				long a[][]=new long[n][m];
  				for(int i=0;i<n;i++) for(int j=0;j<m ;j++) a[i][j]=nextLong();
  				return a;
  			}
  		 char[][] ca(int n , int m)
  			{
  				char a[][]=new char[n][m];
  				for(int i=0;i<n;i++)
  					{
  					String x =next();
  					for(int j=0;j<m ;j++) a[i][j]=x.charAt(j);
  					}
  				return a;
  			}
  
  		long[] la(int n)
  		{
  			long a[]=new long[n];
  			for(int i=0;i<n;i++)a[i]=nextLong();
  			return a;
  		}
  
  		String nextLine() 
  		{ 
  			String str = ""; 
  			try
  			{ 
  				str = br.readLine(); 
  			} 
  			catch (IOException e) 
  			{ 
  				e.printStackTrace(); 
  			} 
  			return str; 
  		} 
  	}
  	static void sort(long[] a) 
  	{int n=a.length;Random r=new Random();for (int i=0; i<a.length; i++) {long oi=r.nextInt(n), temp=a[i];a[i]=a[(int)oi];a[(int)oi]=temp;}Arrays.sort(a);}
      static void sort(int[] a) 
      {int n=a.length;Random r=new Random();for (int i=0; i<a.length; i++) {int oi=r.nextInt(n), temp=a[i];a[i]=a[oi];a[oi]=temp;}Arrays.sort(a);}
  	public static long sum(long a[])
  	{long sum=0; for(long i : a) sum+=i; return(sum);}
  	public static long count(long a[] , long x)
  	{long c=0; for(long i : a) if(i==x) c++; return(c);}
  	public static int sum(int a[])
  	{ int sum=0; for(int i : a) sum+=i; return(sum);}
  	public static int count(int a[] ,int x)
  	{int c=0; for(int i : a) if(i==x) c++; return(c);}
  	public static int count(String s ,char ch)
  	{int c=0; char x[] = s.toCharArray(); for(char i : x) if(ch==i) c++; return(c);}
  	public static boolean prime(int n)
  	{for(int i=2 ; i<=Math.sqrt(n) ; i++) if(n%i==0) return false; return true;}
  	public static boolean prime(long n)
  	{for(long i=2 ; i<=Math.sqrt(n) ; i++) if(n%i==0) return false; return true;}
  	 public static int gcd(int n1, int n2)
  	  { if (n2 != 0)return gcd(n2, n1 % n2); else return n1;}
  	 public static long gcd(long n1, long n2)
  	  { if (n2 != 0)return gcd(n2, n1 % n2); else return n1;}
  	 public static int[] freq(int a[], int n)
  	  { int f[]=new int[n+1]; for(int i:a) f[i]++; return f;}
  	 public static int[] pos(int a[], int n)
  	  { int f[]=new int[n+1]; for(int i=0; i<n ;i++) f[a[i]]=i; return f;}
  	 public static int[] rev(int a[])
  	 {
  		 for(int i=0 ; i<(a.length+1)/2;i++)
  		 {
  			 int temp=a[i];
  			 a[i]=a[a.length-1-i];
  			 a[a.length-1-i]=temp;
  		 }
  		 return a;
  	 }
  	
  	 public static long mindig(long n)
  	 {
  		 long ans=9; while(n>0) { if(n%10<ans) ans=n%10; n/=10; }
  		 return ans;
  	 }
  	 public static long maxdig(long n)
  	 {
  		 long ans=0; while(n>0) { if(n%10>ans) ans=n%10; n/=10; }
  		 return ans;
  	 }
  	  
  	public static boolean palin(String s)
  	{
  		StringBuilder sb = new StringBuilder();
  		sb.append(s);
  		String str=String.valueOf(sb.reverse());
  		if(s.equals(str))
  			return true;
  		else return false;
  	}
  	public static String rev(String s)
  	{
  		StringBuilder sb = new StringBuilder();
  		sb.append(s);
  		return String.valueOf(sb.reverse());
  		
  	}
  	
     
  	public static void main(String args[])
  	{
  
  		FastReader in=new FastReader();
  		PrintWriter so = new PrintWriter(new BufferedWriter(new  OutputStreamWriter(System.out)));
  		_practise ob = new _practise();
  		
  	    
  	   int T = in.nextInt();		
  	     // int T = 1;
  	    
  	     tc : while(T-->0)
  		 { 
  	    	//int a[] = in.ia(7);
  	    //	so.println(a[0]+" "+a[1]+" "+(a[6]-a[0]-a[1]));
  	    	 int n = in.nextInt();
  	    	 String s[] = new String[n-2];
  	    	 for(int i=0 ; i<n-2 ; i++) s[i]=in.next();
  	    	 String str=s[0];
  	    	 for(int i=1 ; i<n-2 ; i++)
  	    	 {
  	    		 if(s[i].charAt(0)==s[i-1].charAt(1))
  	    			 str+=s[i].charAt(1);
  	    		 else str+=s[i];
  	    	 }
  	    	 if(str.length()<n) str+='a';
  	    	 so.println(str);
  	    	
  	     }
  	    
  		
  		so.flush();
  	
  		
  	}
  }