#include <bits/stdc++.h>
using namespace std;
#define FOR(i, a, b) for(int i = (a); i < (b); i++)
#define RFOR(i, a, b) for(int i = (a) - 1; i >= (b); i--)
#define SZ(a) int(a.size())
#define ALL(a) a.begin(), a.end()
#define PB push_back
#define MP make_pair
#define F first
#define S second
typedef long long LL;
typedef vector<int> VI;
typedef vector<LL> VL;
typedef pair<int, int> PII;
typedef pair<LL, LL> PLL;
typedef double db;
int main()
{
ios::sync_with_stdio(0);
cin.tie(0);
int n;
cin >> n;
int mask = 0;
vector<string> s(n);
FOR (i, 0, n)
{
cin >> s[i];
mask |= 1 << (s[i][0] - 'A');
}
FOR (i, 0, n)
{
int msk = 0;
FOR (j, 0, SZ(s[i]))
msk |= 1 << (s[i][j] - 'A');
if ((mask & msk) == msk)
{
cout << "Y\n";
return 0;
}
}
cout << "N\n";
return 0;
}
123