#include "iostream"
#include "string"
using namespace std;
int main()
{
string text, word;
getline(cin, text);
for ( int i=3; i<text.length(); i++)
if ( text[i]==' ' )
word=text.substr(i-3, 3);
if (word=="die" or word=="der" or word=="das")
if (int(text[i+1])>96)
text[i+1]=char(int(text[i+1])-32);
}
cout<<text;
#include "iostream"
#include "string"
using namespace std;
int main()
{
string text, word;
getline(cin, text);
for ( int i=3; i<text.length(); i++)
{
if ( text[i]==' ' )
{
word=text.substr(i-3, 3);
if (word=="die" or word=="der" or word=="das")
{
if (int(text[i+1])>96)
{
text[i+1]=char(int(text[i+1])-32);
}
}
}
}
cout<<text;
}