import std.stdio;
import std.ascii;
import std.range;
import std.array;
import std.functional;
import std.algorithm;
import std.conv;
import std.container;
import std.math;
import std.numeric;
import std.string;
import std.c.string;
import std.regex;
import std.typecons;

void main() {
    int N;
    string[] A;
    
    bool input() {
        scanf("%d\n", &N);
        if (stdin.eof) return false;
        A = readln.chomp.split(" ").array;
        
        bool[] del = new bool[N];
        foreach (i; 0 .. N) {
            if (A[i][0] == A[i][1]) {
                char c = A[i][0];
                foreach (j; 0 .. N) {
                    if (i == j) continue;
                    if (A[j][0] == c || A[j][1] == c) {
                        del[i] = true;
                    }
                }
            }
        }
        int nN; string[] nA;
        foreach (i; 0 .. N) {
            if (!del[i]) {
                nN++;
                nA ~= A[i];
            }
        }
        N = nN;
        A = nA;
        return true;
    }

    auto memo = new byte[][](7, 1 << 21);

    bool hasEdge(int last, in string s) {
        char l = cast(char)(last + '0');
        foreach (i; 0 .. 2) {
            if (l == s[i]) return true;
        }
        return false;
    }

    void solve() {
        //writeln(A);
        foreach (i; 0 .. 7) memo[i][] = -1;
        bool dfs(int last, int bit) {
            if (bit == (1 << N) - 1) return 1;
            if (memo[last][bit] >= 0) return memo[last][bit] == 1;
            foreach (i; 0 .. N) {
                if (bit & (1 << i)) continue;
                char l = cast(char)(last + '0');
                if (l == A[i][0] || l == A[i][1]) {
                    int nlast = (l == A[i][0] ? A[i][1] : A[i][0]) - '0'; 
                    if (dfs(nlast, bit | (1 << i))) {
                        memo[last][bit] = 1;
                        //writeln(i);
                        return true;
                    }
                }
            }
            memo[last][bit] = 0;
            return false;
        }

        bool Ans = false;
        foreach (i; 0 .. N) {
            int l = A[i][0] - '0';
            Ans |= dfs(l, 1 << i);
            l = A[i][1] - '0';
            Ans |= dfs(l, 1 << i);
        }
        writeln(Ans ? "Yes" : "No");
    }

    while (input) solve;
}