Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"strings"
)

var scanner = bufio.NewScanner(os.Stdin)

func nextString() string {
	scanner.Scan()
	return scanner.Text()
}

func incrementByte(b byte) byte {
	if b >= 97 && b < 122 {
		return b + 1
	} else if b == 122 {
		return 97
	}
	return b
}

func main() {
	scanner.Split(bufio.ScanLines)

	for {
		line := nextString()
		if len(line) == 0 {
			break
		}
		for i := 0; i <= 26; i++ {
			decoded := []byte{}
			for j := 0; j < len(line); j++ {
				decoded = append(decoded, incrementByte(line[j]))
			}
			line = string(decoded)
			if strings.Contains(line, "the") || strings.Contains(line, "this") || strings.Contains(line, "that") {
				fmt.Println(line)
				break
			}
		}
	}
}

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
	string s,t;
	getline(cin,s);t=s;
	for(int i=0;i<26;i++){
		s=t;
		for(int j=0;j<s.size();j++){
			if(s[j]>='a'&&s[j]<='z')for(int k=0;k<i;k++){
				s[j]++;
				if(s[j]>'z')s[j]-=26;
			}
		}
		if(s.find("the")!=s.npos||s.find("this")!=s.npos||s.find("that")!=s.npos)break;
	}
	cout<<s<<endl;
}

C++: #include <iostream>
#include <cstring>
#include <stdio.h>

int find(const std::string &str){
	return (str.find("this",0)!=std::string::npos) + (str.find("that",0)!=std::string::npos) + (str.find("the",0)!=std::string::npos);
}

std::string rot(const std::string &prm, int n)
{
	std::string str=prm;

	for(int i=0; i < str.size(); i++){
		if(('a'<=str[i]) && (str[i]<='z'))
			str[i] = (str[i]+n > 'z')?(str[i]+n-'z'+'a'-1):(str[i]+n);
	}
return str;
}
	
int main(void)
{
	char s[81]="";
	while(std::cin.getline(s,sizeof(s)))
	{
		std::string in=s;
		for(int i=0;i < ('z'-'a')+1;i++)
		{
			if(find(rot(in, i))){
				std::cout << rot(in, i) << std::endl;
				break;
			}
		}
	}
	return 0;
}

C++: 
#include <iostream>
#include <string>
using namespace std;

int main(void)
{
	string s;
	getline(cin, s);
	int diff='t'-s[0];

	for(int i=0; i<s.length(); i++)
	{
		if(s[i]!=' ' && s[i]!='.')
			s[i] = (s[i]+diff-'a'+26)%26+'a';
	}
	cout << s << endl;

	return 0;
}

C++: #include <iostream>
#include <complex>
#include <cmath>
#include <cstdio>
#include <string>

using namespace std;

string rotate(string str) {
    for (int i = 0; i < str.size(); i++) {
        if ('a' <= str[i] && str[i] < 'z')str[i]++;
        if (str[i] == 'z')str[i] = 'a';
    }
    return str;
}

int main() {
    string str;
    while(getline(cin, str)) {
        for (int i = 0; i < 26; i++) {
            str = rotate(str);
            if (str.find("this") != string::npos ||
                str.find("the") != string::npos ||
                str.find("that") != string::npos) {
                cout << str << endl;
                break;
            }
        }
    }
    return 0;
}

C++: //#define _USE_MATH_DEFINES
//#include <cmath>
#include <iostream>
//#include <stdio.h>
//#include <stdlib.h>
//#include <iomanip>
#include <vector>
#include <string>
//#include <algorithm>
//#include <functional>
//#include <time.h>
#include <sstream>

using namespace std;

bool isthe(string str){
	//?????????????????????????????? the this that?????¢??? ????????°ture

	int d1, d2, d3;

	d1 = (str[1] - str[0] + 26) % 26;

	if (d1 != 14){
		return false;
	}
	else{
		d2 = (str[2] - str[0] + 26) % 26;
		if (d2 != 11 && d2 != 15 && d2 != 7){
			return false;
		}
		else{
			if (d2 == 11 && str.size() == 3){
				return true;
			}
			else{
				d3 = (str[3] - str[0] + 26) % 26;
				if (d2 == 15 && d3 == 25) return true;
				if (d2 == 7 && d3 == 26) return true;
			}
		}
	}

	return false;

}


int main(){
	
	string s,sc, buf;
	stringstream ss;
	vector <string> as;
	int dif = 0;


	while (getline(cin, s)){
		dif = 0;
		buf = "";
		sc = "";
		ss.str("");
		ss.clear();

		sc += s;
		for (int i = 0; i < sc.size(); i++){
			if (sc[i] == '.')sc[i] = ' ';
		}
		ss << sc;

		while (ss >> buf){
			//the this that???????´¢
			if (buf.size() == 4){
				if (isthe(buf)){
					dif = (buf[0] - 't' + 26)%26;
					break;
				}
			}
			if (buf.size() == 3){
				if (isthe(buf)){
					dif = (buf[0] - 't' + 26) % 26;
					//break;
				}
			}
		}

		for (int i = 0; i < s.size(); i++){
			if (s[i] >= 'a' && s[i] <= 'z') {
				s[i] -= dif;
				if (s[i] < 'a') s[i] += 26;
				if (s[i] > 'z') s[i] -= 26;
			}
		}

		cout << s << endl;
	}


	return 0;
}

C++: #include<iostream>
#include<string>
using namespace std;

void coding(){
  string s;

  while(getline(cin, s)){
    bool flag = false;
    
    while(true){

      for(int i=0;i<s.length();i++){
	
	string key1 = s.substr(i,3);
	string key2 = s.substr(i,4);
	if(key1 == "the" || key2 == "this" || key2 == "that"){
	  flag = true;
	}
      }
      
      if(flag){
	break;
      }else{
	
    
	for(int i=0;i<s.length();i++){
	  if(s[i] >= 'a' && s[i] <= 'z'){
	    // s[i] -= 'a';
	    // s[i] += 1;
	    // s[i] = s[i]%('A'-'a');
	    // s[i] += 'a';

	    s[i] -= 'a' - 'A';
	    s[i] = ('A' + s[i] - 'A' + 26 + 1)%26;
	    s[i] += 'a' - 'A';
	    
	  }else{
	    continue;
	  }
	}
      }
    }
    cout << s << endl;
  }
}


int main(){
  coding();
}

C++: #include<bits/stdc++.h>
using namespace std;

string str;

int main(){
    while(getline(cin,str)){
        for(int i=0;i<26;i++){
            if(str.find("the")!=string::npos)break;
            if(str.find("this")!=string::npos)break;
            if(str.find("that")!=string::npos)break;

            for(int j=0;j<str.size();j++){
                if(!isalpha(str[j]))continue;
                str[j]=(str[j]-'0'+1)%26+'a';
            }
        }
        cout<<str<<endl;
    }
    return 0;
}

C++: #include <iostream>
#include <string>

using namespace std;

int main(int argc, const char * argv[])
{
    int shift = 0, i=0;
    string in,out;
    getline(cin,in);
    out = in;
    do {
        for (i=0; i<in.length(); i++) {
            if (in[i]<='z'&&in[i]>='a') {
                out[i] = ((in[i] - 'a' + shift) % 26) + 'a';
            }
        }
        if (out.find("the")!=std::string::npos||out.find("that")!=std::string::npos||out.find("this")!=std::string::npos) {
            break;
        }
        else
            shift++;
    } while (1);
    
    cout<<out;
    cout<<out.length();
    return 0;
}