# Construct a String Spelled by a Gapped Genome Path
solved by 144

## Gapped Genome Path String Problem

*Reconstruct a string from a sequence of (k,d)-mers corresponding to a path in a paired de Bruijn graph.*

Given: A sequence of *(k, d)*-mers (*a*_{1}|b_{1}), ... , (*a*_{n}|b_{n}) such that *Suffix(a*_{i}|b_{i}) = Prefix(a_{i+1}|b_{i+1}) for all *i* from 1 to n-1.

Return: A string *Text* where the *i*-th *k*-mer in *Text* is equal to *Suffix(a*_{i}|b_{i}) for all *i* from 1 to n, if such a string exists.

## Sample Dataset

4 2
GACC|GCGC
ACCG|CGCC
CCGA|GCCG
CGAG|CCGG
GAGC|CGGA

## Sample Output

Please login to solve this problem.