#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
string str;
getline(cin, str);
int letters = 0;
int words = 0;
int lines = 0;
bool flag = false;
while (str.size()) {
lines++;
for (auto c : str) {
if (isalpha(c)) {
letters++;
flag = true;
} else if (flag) {
flag = false;
words++;
}
}
if (flag) {
words++;
}
getline(cin, str);
}
cout << "Input file contains:\n";
cout << letters << " letters\n";
cout << words << " words\n";
cout << lines << " lines\n";
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8c3RyaW5nPgojaW5jbHVkZSA8dmVjdG9yPgoKdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCmludCBtYWluKCkgewogICAgc3RyaW5nIHN0cjsKICAgIGdldGxpbmUoY2luLCBzdHIpOwogICAgaW50IGxldHRlcnMgPSAwOwogICAgaW50IHdvcmRzID0gMDsKICAgIGludCBsaW5lcyA9IDA7CiAgICBib29sIGZsYWcgPSBmYWxzZTsKICAgIHdoaWxlIChzdHIuc2l6ZSgpKSB7CiAgICAgICAgbGluZXMrKzsKICAgICAgICBmb3IgKGF1dG8gYyA6IHN0cikgewogICAgICAgICAgICBpZiAoaXNhbHBoYShjKSkgewogICAgICAgICAgICAgICAgbGV0dGVycysrOwogICAgICAgICAgICAgICAgZmxhZyA9IHRydWU7CiAgICAgICAgICAgIH0gZWxzZSBpZiAoZmxhZykgewogICAgICAgICAgICAgICAgZmxhZyA9IGZhbHNlOwogICAgICAgICAgICAgICAgd29yZHMrKzsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICBpZiAoZmxhZykgewogICAgICAgICAgICB3b3JkcysrOwogICAgICAgIH0KICAgICAgICBnZXRsaW5lKGNpbiwgc3RyKTsKICAgIH0KICAgIGNvdXQgPDwgIklucHV0IGZpbGUgY29udGFpbnM6XG4iOwogICAgY291dCA8PCBsZXR0ZXJzIDw8ICIgbGV0dGVyc1xuIjsKICAgIGNvdXQgPDwgd29yZHMgPDwgIiB3b3Jkc1xuIjsKICAgIGNvdXQgPDwgbGluZXMgPDwgIiBsaW5lc1xuIjsKICAgIHJldHVybiAwOwp9Cg==