class Solution {
public:
vector<string> findWords(vector<string>& words) {
vector<string> res;
unordered_set <char> row1 = { 'q','Q','w','W','e','E','r','R','t','T','y','Y','u','U','i','I','o','O','p','P' };
unordered_set <char> row2 = { 'a','A','s','S','d','D','f','F','g','G','h','H','j','J','k','K','l','L'};
unordered_set <char> row3 = { 'z','Z','x','X','c','C','v','V','b','B','n','N','m','M'};
for(int i=0;i<words.size();i++){
bool s1=true,s2=true,s3=true;
for(int j=0;j<words[i].size();j++){
if(s1 && row1.find(words[i][j])==row1.end())
s1=false;
if(s2 && row2.find(words[i][j])==row2.end())
s2=false;
if(s3 && row3.find(words[i][j])==row3.end())
s3=false;
}
if(s1||s2||s3)
res.push_back(words[i]);
}
return res;
}
};