#include <iostream>
#include <string>
#include <cctype>
using namespace std;
int main()
{
    string word1 word2;
    getline (cin, word1 word2);
    
    for(char c: str){
        if (isspace(c)) {
            cout<<"Invalid input";
            return 0;
        }
        for(char c: str){
        if (ismerge(c)) {
            cout<<result;
            return 0;
    }
}