unittest
{
	assert( [ "4", "hoge", "english", "hoge", "enigma" ].parse.expand.solve == "No" );
	assert( [ "9", "basic", "c", "cpp", "php", "python", "nadesico", "ocaml", "lua", "assembly" ].parse.expand.solve == "Yes" );
	assert( [ "8", "a", "aa", "aaa", "aaaa", "aaaaa", "aaaaaa", "aaa", "aaaaaaa" ].parse.expand.solve == "No" );
	assert( [ "3", "abc", "arc", "agc" ].parse.expand.solve == "No" );
}



import std.algorithm;
import std.conv;
import std.range;
import std.stdio;
import std.string;
import std.typecons;

void main()
{
	stdin.byLineCopy.parse.expand.solve.writeln;
}

auto parse( Range )( Range input )
if( isInputRange!Range && is( ElementType!Range == string ) )
{
	auto n = input.front.strip.to!( long );
	auto ws = new string[ n ];
	foreach( ref w; ws )
	{
		input.popFront;
		w = input.front.strip;
	}
	return tuple( ws );
}

auto solve( string[] ws )
{
	if( ws.dup.sort().uniq.walkLength != ws.length ) return "No";
	
	auto p = "0" ~ ws[ 0 ][ 0 ];
	
	foreach( w; ws )
	{
		if( p[ $ - 1 ] != w[ 0 ] ) return "No";
		p = w;
	}
	
	return "Yes";
}
