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<iostream>
#include<string>
#include<algorithm>
#include<cmath>
using namespace std;

int main(){
  string s;
  int cnt=0;

  while(getline(cin, s)){


    while(true){
      bool flag=false;

      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;
          break;
        }
      }

      if(flag){
        cout << s << endl;
        break;
      }

      for(int i=0;i<s.length();i++){
        if(s[i] > 'a' && s[i] < 'z'){
          s[i] -= 'a';
          s[i] -= 1;
          if(s[i] < 0){
            s[i] += 'A' - 'a';
          }
          s[i] += 'a';
        }
      }
    }
  }
}

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

using namespace std;

void CaesarCipher(const string&);
int main(){
  string str;
  while(getline(cin,str)){
    CaesarCipher(str);
  }
}


void CaesarCipher(const string& str){
  string diffstr=str;
  while(diffstr.find("the")==string::npos&&
        diffstr.find("this")==string::npos&&
        diffstr.find("that")==string::npos ){
    for(int i=0;i<str.length();i++){
      diffstr[i]+=isalpha(str[i])?1:0;
    }
  }
}

C++: #include<iostream>
#include<algorithm>
#include<string>
#include<cstdio>
#include<cstring>
using namespace std;
int main(){
  string str;
  char s[256];
  int w = 0;
  while(scanf(" %c",&s[0]) != EOF{
    do {
      w++;
      scanf("%c",&s[w]);
    }while(s[w] != '\n');
    while(1){
      s[w+1] = '\0';
    
      for(int i=0;i<w;i++){
	if(s[i] != ' ' && s[i] != '.'){
	  s[i]++;
	  if(s[i]>'z')s[i] = s[i] - 'z' + 'a' - 1;
	}
      }
      if(strstr(s,"the") != NULL)break;
      if(strstr(s,"that") != NULL)break;
      if(strstr(s,"this") != NULL)break;
    }
    printf("%s",s);
    memset( s , 0 , sizeof(s) );
  }
}

C++: 
using namespace std;
int main(){
  char str;
  while(1){
    str = getchar();
    if(str=='.'){
      cout<<str;
      break;
    }
    if(str!=' '){
      str=str-4;
      cout<<str;
    }else{
      cout<<" ";
    }
  }
  cout<<endl;
  return 0;
}

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

int main(){
  int index ,flag=0 ,temp= 'z' - '`';
  string s ,key[3]={ "the" ,"this" ,"that" };

  while( true ){
    flag = 0;
    getline( cin ,s );
    if( cin.eof() ){
      break;
    }

    while( true ){
      for( int i=0 ; i<s.length() ; i++ ){ // シーザー暗号を戻す
	if( s[i] != '.' && s[i] != ' ' && s[i] != '\n' ){ //　記号はスルー
	  s[i]--;
	  if( s[i] < 'a' ){ // aからzに飛ばす
	    s[i] += temp; 
	  }
	}
      }
      
      for( int i=0 ; i<3 ; i++ ){
	index = s.find( key[i] ,0 ); // the ,this ,that を探す
	if( index != string::npos ){ // あった場合
	  cout << s << endl;
	  flag = 1;
	  cin.ignore();
	  break;
	}
      }
      if( flag == 1 ){
	break;
      }
    }
  }
}

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

int main(){
  string s;
  while(1){
    getline(cin,s);
    if(cin.eof()) break;
    for(int i=0;i<25;i++){
      if((s.find("this")!=string::npos) || (s.find("that")!=string::npos) || (s.find("the")!=string::npos)) break;
      for(int j=0;j<=s.size();j++){
	if(s[j] >= 'a' && s[j] <= 'y') s[j]++;
	else if(s[j] == 'z') s[j]='a';
      }
    }
    cout << s << endl;
  }
}

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

string arrs[200];

bool judge4(const string &str) {
	int d1 = str[0] - 't';
	int d2 = str[1] - 'h';
	int d3 = str[2] - 'i';
	int d4 = str[3] - 's';
	int d5 = str[2] - 'a';
	int d6 = str[3] - 't';
	return (d1 == d2 && ((d2 == d3 && d3 == d4) || (d2 == d5 && d3 == d6)));
}

bool judge3(const string &str) {
	int d1 = str[0] - 't';
	int d2 = str[1] - 'h';
	int d3 = str[2] - 'e';
	return (d1 == d2 && d2 == d3);
}

int main() {
	cin.clear();
	int cnt = 0;
	while (!cin.eof()) {
		cin >> arrs[cnt++];
		char ch = getchar();
		if (ch == '\n') {
			bool isOk = 0;
			int delta = 0;
			for (int i = 0; i < cnt; ++i) {
				if (arrs[i].length() == 4) {
					if (judge4(arrs[i])) {
						isOk = 1;
						delta = arrs[i][0] - 't';
						break;
					}
				}else if (arrs[i].length() == 3) {
					if (judge3(arrs[i])) {
						isOk = 1;
						delta = arrs[i][0] - 't';
						break;
					}
				}
			}
			for (int i = 0; i < cnt; ++i) {
				for (int j = 0; j < arrs[i].length(); ++j) 
					if (arrs[i][j] != '.') arrs[i][j]-= delta;
				cout << arrs[i] << ((i == cnt - 1) ? "\n" : " ");
			}
			cnt = 0;
		}
	}
	return 0;
}

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

int main() {
	string sa;
	while (getline(cin, sa)&& sa != "END OF INPUT") {
		int a = sa.size();
		while (1) {
			for (int i = 0; i < a; i++) {
				if (sa[i] >='a' && sa[i] <='z') {
					sa[i] += 1;
				}
					if (sa[i]<'z'){
						sa[i] -= 26;
					}				
			}
			size_t za=sa.find(" this "||" that "||" the ");
			if (za != string::npos) {break;}
		}
		cout << sa << endl;
	}
	return 0;
}

C++: #include <bits/stdc++.h>
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define RFOR(i,a,b) for(int i=(b) - 1;i>=(a);i--)
#define REP(i,n) for(int i=0;i<(n);i++)
#define RREP(i,n) for(int i=n-1;i>=0;i--)

#define PB push_back
#define INF INT_MAX/3
#define ALL(a) (a).begin(),(a).end()
#define CLR(a) memset(a,0,sizeof(a))

typedef long long int ll;

using namespace std;

int main(){

    string s[] = {"this","the","that"};
    vector<string> in;
    while(true){
	string temp;
	cin >> temp;
	if(cin.eof()) break;
	in.PB(temp);

    }
    bool f = false;
    int d = 1;
    REP(i,30){

	f = true;
	REP(i,in.size()) REP(j,in[i].size()){
	    if(in[i][j] == '.') continue;
	    in[i][j] = (char)( 'a' + ( (int)(in[i][j] - 'a') + d) % 28);
	}
	vector<bool> flgs(3,false);
	for(int i=0;i<in.size();i++){
	    REP(j,3){
		bool flg = true;
		REP(k,s[j].size()) if(s[j][k] != in[i][k]) flg = false;
		if(flg)
		    flgs[j] = true;
	    }
	}
	REP(i,3) if( !flgs[i]) f = false;
	if(f) break;
    }
    REP(i,in.size()-1) cout << in[i] << " ";
    cout << in[in.size()-1] <<  endl;

    return 0;
}

C++: #include<stdio.h>
#include<string.h>

char ans[200][82];
int main(){
	char str[82];
	int cor = 0;
	while(gets(str) != NULL){	//改行は読まない。はず!??
		int len;
		//char tran;
		len = strlen(str);
		//tran = 0;
		while(strstr(str,"this") == NULL && strstr(str,"that") == NULL && strstr(str,"the") == NULL){ 
			//tran++;
			for(int i = 0;i < len;i++){
				if(str[i] == 'z'){
					str[i] = 'a';
					continue;
				}
				if(str[i] == ' ' || str[i] == '.')
					continue;
				//str[i] = str[i]+tran;
				str[i]++;
			}
			//printf("%s\n",str);
		}
		strcpy(ans[cor],str);
		cor++;
	}
	for(int i = 0;i < cor;i++){
		printf("%s\n",ans[i]);
	}
	return 0;
}