Go: package main

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

var scanner = bufio.NewScanner(os.Stdin)

func main() {
	for scanner.Scan() {
		var result string
		line := scanner.Text()
		key := make(map[string]string)

		var i int32
		for ; i < 52; i++ {
			makeKey(key, i)
			result = decode(key, line)

			if strings.Contains(result, "the") {
				break
			} else if strings.Contains(result, "this") {
				break
			} else if strings.Contains(result, "that") {
				break
			}
		}

		fmt.Println(result)
	}
}

func makeKey(key map[string]string, shift int32) {
	for i := 'a'; i <= 'z'; i++ {
		cipher := (i + shift)
		if cipher > 'z' {
			cipher = cipher%'z' + 'a' - 1
		} else if cipher < 'a' {
			cipher = cipher + ('z' - 'a') + 1
		}
		key[string(i)] = string(cipher)
	}
}

func decode(key map[string]string, cipher string) string {
	var result string
	for _, v := range cipher {
		if key[string(v)] != "" {
			result += key[string(v)]
		} else {
			result += string(v)
		}
	}
	return result
}

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

bool checkString(int* key, string s);
void rotateChar(string* s, int i);

int main()
{
    list<string> table;
    char text[80];
	int size=0;

	for(size=0; cin.get(text[size]); size++ ){;}

	char ch;
	string s;
	for(int i=0; (ch=text[i])!=EOF; i++){
		if(ch!=' ')s.push_back(ch);
		else{ table.push_back(s), s.clear();}
	}		

    int key; // ずらす文字数
    list<string>::iterator i;
    for(i=table.begin(); i!=table.end(); i++){
        // cout << *i << " ";
        if( i->size() == 3 || i->size() == 4 )
            if( checkString(&key, *i) ) break;
    }
	
	for(int i=0; i<size; i++){
		char ch = text[i];
		if(isalpha(ch)){
        char c = ch - 'a';
        ch = 'a' + (c+key)%26;
		}
		cout.put(ch);
	}

    return 0;
}

void rotateChar(string* s, int i) // iは何文字ずらしたいか
{

    for(int j=0; j<s->size(); j++){
        if(!isalpha(s->at(j))){continue;}
        char c = s->at(j) - 'a';
        s->at(j) = 'a' + (c+i)%26;
    }
}

bool checkString(int* key, string s)
{

    for(int i=0; i<26; i++){
        string tmp = s;
        rotateChar(&tmp, i);
        // cout << tmp << endl;
        if( tmp=="the" || tmp=="this" || tmp=="that" ){
            *key=i;
            return true;
        }
    }
    return false;
}

C++: #include<stdio.h>
#include<string.h>
int main(void)
{
	int i=1,x;
	char s;
	while(s=getchar()!='\n' && s!=EOF)
	{
	  if(i==1) 
	  {
		  x ='t'-s;
		  i+=1;
	  }
	  if (s>'a'&&s<'z'){
	    if(s-x<'a') 
		  s=s-x+27;
	    else 
		  s=s-x;
	  }
         printf("%s",s);
	}
  return 0;
}

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

using namespace std;

int main() {
	string str;
	
	while (getline(cin, str)) {
	
		for (int i=0; i<26; i++) {
			if (str.find("the")!=str.npos || str.find("this")!=str.npos || str.find("that")!=str.npos) break;
			for (int j=0; j<(int)str.size(); j++) {
				if (str[j] == '.' || str[j] == ' ') continue;
				str[j] = 'a' + (str[j] - 'a' + 1)%26;
			}
		}
	
		cout << str << endl;
		
	}
	
	return 0;
}

C++: #include <bits/stdc++.h>

using namespace std;

void f(string &s)
{
    for (char &c : s) {
        if ('a' <= c && c <= 'z') c = (c - 'a' + 25) % 26 + 'a';
    }
}

int main()
{
    string s;

    while (getline(cin, s)) {
        if (s.empty()) break;
        while (s.find("the") == string::npos && s.find("this") == string::npos && s.find("that") == string::npos) f(s);
        cout << s << endl;
    }
}

C++: #include <cstdio>
#include <iostream>
#include <cstring>

using namespace std;

char data[26]={'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'};
char trans[100];
char mozi;
int position=0;
int zoom;
int first_check=0,first_position=0;
int now;
char result;

int main(){
	while(scanf("%c",&mozi) != EOF){
		for(int i=0;i<26 && first_check == 0;i++){
			if(mozi == data[i]){
				first_position = i;
				zoom = first_position - 19;
				first_check = 1;
			}
		}




		if(mozi == ' ' || mozi == '.' || mozi == '\n'){
			trans[position] = mozi;
			position++;

			if(mozi == '\n'){
				cout << trans << endl;
				first_check = 0;
				position = 0;
				memset(trans,'\0',sizeof(trans));
			}
		}else{
			for(int i=0;i<26;i++){
				if(data[i] == mozi){
					now = i;
					break;
				}
			}

			trans[position] = data[now - zoom];
			position++;

		}
	}
}

C++: /*0017 written by iPhone*/
#include <iostream>
#include <string>
#include <cstring>

using namespace std;

int main(){
    string s;
    while(getline(cin, s) && s != "\0"){
        for(int i = 0; i < s.size(); i++) s[i]++;
        if(strstr(s.c_str(), "the") || strstr(s.c_str(), "this") || strstr(s.c_str(), "that") ){
            cout << s;
            return 0;
        }
    }
    return 0;
}

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

bool decision(string input){
	for(int i = 0; i < input.size()-3; i++){
		if((input[i] == 't' && input[i+1] == 'h' && input[i+2] == 'e') ||
			(input[i] == 't' && input[i+1] == 'h' && input[i+2] == 'i' && input[i+3] == 's') ||
			(input[i] == 't' && input[i+1] == 'h' && input[i+2] == 'a' && input[i+3] == 't')){
			return true;
		}
	}
	return false;

}

int main(){
	string input;
	getline(cin, input);

	while(getline(cin, input);){
		for(int i = 0; i < input.size(); i++){
			if('a' <= input[i] && input[i] <= 'z'){
				if(input[i] != 'z'){
					input[i] += 1;
				}else{
					input[i] = 'a';
				}
			}
		}
		if(decision(input)) cout << input << endl;
	}

	return 0;
}

C++: #include <iostream>
#include <istream>
#include <cstring>

using namespace std;

int main(int argc, char **argv)
{
	int n;
	char a[82], b[82], t;
	
	while(cin.getline(a, 82, '\n')){
		n = strlen(a);
		for(int i = 0, f = 0; i < 26; i++){
			for(int j = 0; j < n; j++){
				if(a[j] == ' ' || a[j] == '.'){
					b[j] = a[j];
				} else {
					t = a[j] - i;
					if(t < 'a'){
						t += 25;
					} else if(t > 'z'){
						t -= 25;
					}
					b[j] = t;
				}
			}
			
			for(int j = 0; j < n; j++){
				if(b[j] == 't' && j == 0 && b[j+1] == 'h'){
					if(b[j+2] == 'e' && b[j+3] == ' '){
						f = 1;
						break;
					} else if(b[j+2] == 'a' && b[j+3] == 't' && b[j+4] == ' '){
						f = 1;
						break;
					} else if(b[j+2] == 'i' && b[j+3] == 's' && b[j+4] == ' '){
						f = 1;
						break;
					}
				} else if(b[j] == ' ' && b[j+1] == 't' && b[j+2] == 'h'){
					if(a[j+3] == 'e' && a[j+4] == ' '){
						f = 1;
						break;
					} else if(b[j+3] == 'a' && b[j+4] == 't' && b[j+5] == ' '){
						f = 1;
						break;
					} else if(b[j+3] == 'i' && b[j+4] == 's' && b[j+5] == ' '){
						f = 1;
						break;
					}
				}
			}
			if(f == 1){
				for(int i = 0; i < n; i++){
					cout << b[i];
				}
				cout << endl;
				break;
			}
		}
	}
	
	return 0;
}

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

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

int main(void){
	vector<string> v;
	string str;

	while(cin>>str){
		v.push_back(str);
	}

	for(int cif=0;cif!=26;cif++){
		for(int i=0;i<v.size();i++){
			for(int j=0;j<v[i].length();j++){
				if('A'<=v[i][j]&&v[i][j]<='Z'){
					v[i][j]=(v[i][j]-'A'+1)%26+'A';
				}else if('a'<=v[i][j]&&v[i][j]<='z'){
					v[i][j]=(v[i][j]-'a'+1)%26+'a';
				}
			}
		}
		for(int i=0;i<v.size();i++){
			if(v[i]=="that" || v[i]=="the"||v[i]=="this"){
				for(int k=0;k<v.size();k++){
					if(k!=v.size()-1)cout<<v[k]<<" ";
					else cout<<v[k];
				}
				exit(0);
			}
		}
	}
	return 0;
}