#include <string>
#include <iostream>
using namespace std;

int main(){
	string angou;
	
	while (getline(cin, angou)){
		int a = angou.size();

		for (int i = 0; i < 26; i++)
		{
			for (int q = 0; q < a; q++){
				if (angou[q] == ' ' || angou[q] == '.') continue;

				if (angou[q] == 'z') angou[q] = 'a';
				else angou[q]++;
			}

			bool theExists = angou.find("the") != string::npos;
			bool thisExists = angou.find("this") != string::npos;
			bool thatExists = angou.find("that") != string::npos;
			if (theExists || thisExists || thatExists)
			{
				cout << angou << endl;
				continue;
			}
		}
	}

	return 0;
}

#include<bits/stdc++.h>
using namespace std;
int main(){
  string s;
  cin>>s;
  int l=s.length(),j,k;
  vector<int> v(26,-1);
  for(j=0;j<l;j++){
    k=s[j]-'a';
    if(v[k]==-1||j-v[k]>2) v[k]=j;
    else{
      cout<<v[k]+1<<' '<<j+1<<endl;
      return 0;
    }
  }
  cout<<"-1 -1"<<endl;
}