#include
#include
#include
using namespace std;
int main()
{
string words[5] = { "ABCD", "BCDEF", "CERF","DERT", "EFRE"};
string* where;
where = find(words, words + 5, "CD");
cout << *++where << endl;
sort(words, words + 5);
where = find(words, words + 5, "ER");
cout << *++where << endl;
}