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 <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'){
				printf("%s",trans);
				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++: #include<iostream>
#include<vector>
#include<string>

std::string Caesar(std::string str, int tranceNum )
{
	for(size_t i=0; i<str.length(); ++i)
	{
		if(str[i]!='.')
		{
			int chNum = 0;
	
			chNum = str[i];

			chNum += tranceNum;

			chNum = (chNum-97)%26+97;
	
			str[i] = chNum;	
		
		}
	}

	return str;
}

int main(void)
{
	std::string str;
	
	std::vector<std::string> sentence;

	while(!(std::cin.eof()))
	{
	
		while(std::cin >> str)
		{
			sentence.push_back(str);
				
			if(sentence[sentence.size()-1][sentence[sentence.size()-1].length()-1]=='.')
			{
				break;
			}
		}	

		for(bool flg=1; flg; )
		{
			for(size_t j=0; j<sentence.size(); ++j)
			{
			sentence[j] = Caesar(sentence[j],1);	
			}
	
			for(size_t j=0; (j<sentence.size()) && flg; ++j)
			{
				switch(sentence[j].length())
				{
				case 3:
					flg = (sentence[j]=="the") ? 0 : 1;
					break;
				case 4:
					flg = (sentence[j]=="that" || sentence[j]=="this") ? 0 : 1;
					break;
				case 5:
					flg = (sentence[j]=="that." || sentence[j]=="this.") ? 0 : 1;
					break;
				default:
					break;
				}
			}
		}
		for(size_t j=0; j<sentence.size(); ++j)
		{
			std::cout << sentence[j] << ' ';
		}
		std::cout << '\n';
	
		sentence.clear();
		}
}

C++: #include <bits/stdc++.h>
using namespace std;
string word[3] = {"this","that","the"};
int main(){
  char c;
  string s[80];
  int smax = 0;
  while(cin >> c){
    if(c == '\n' || c == ' '){
      smax++;s[smax] += c;
      smax++;
    }else{
      s[smax] += c;
    }
  }
  cout << smax << endl;
  bool flag = false;
  while(1){
    for(int i = 0;i < smax;i++){
      for(int j = 0;j < s[i].size();j++){
	if(isalpha(s[i][j])){
	  s[i][j]++;
	  if(s[i][j] == 'z' + 1)s[i][j] = 'a';
	}
	for(int j = 0;j < 3;j++){
	  if(word[j] == s[i]){flag = true;break;}
	}for(int j = 0;j < 3;j++){
	  if(word[j] + '.' == s[i]){flag = true;break;}
	}
	if(flag)break;
      }
      if(flag)break;
    }
    if(flag)break;
  }
  for(int i = 0;i < smax;i++)cout << s[i];
  return 0;
}

C++: #include<iostream>
#include<string>
using namespace std;
int main()
{
	string key;
	
	while (getline(cin, key)) {

		for (int j = 0; j < 26; j++) {
			for (int i = 0; i < key.size(); i++) {
				if (key[i] >= 'a' && key[i] <= 'z') {
					key[i] = (key[i] == 'z') ? 'a' : key[i] + 1;
				}
			}

			if (key.find("the") != string::npos || key.find("this") != string::npos || key.find("that") != string::npos)
				cout << key;
		}
	}
	return 0;
}

C++: #include <iostream>
#include <cmath>
using namespace std;
int main(){
  string s,t;
  while(true){

    getline(cin,s);
    if(cin.eof())break;

    for(int i = 0 ; i < 26 ; i++ ){
      t = "";
      for(int j = 0 ; j < (int)s.size() ; j++ ){
	if('a'<= s[j] && s[j]<= 'z'){
	  if((s[j] + i) > 'z')t+=(char)(s[j] + i - 26);
	  else t+=(char)(s[j]+i);
	}
	else t += s[j];
      }
      if(t.find("the") != string::npos ||
	 t.find("this") != string::npos ||
	 t.find("that") != string::npos ){
	cout << t << endl;
	break;
      }
    }
  }
  return 0;
}

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

  }
  cout << s << endl;
}

C++: #include <stdio.h>
#include <string.h>
int main(void){
	int i = 0;
	int j;
	int k = 0;
	char s[41][81] = {};

	while (scanf("%s ", s[i]) != EOF)
		i++;

		while (1) {
			for (j = 0; j < i; j++)
				if (strcmp(s[j], "the") == 0 || strcmp(s[j], "this") == 0 || strcmp(s[j], "that") == 0)
					break;

			if (strcmp(s[j], "the") == 0 || strcmp(s[j], "this") == 0 || strcmp(s[j], "that") == 0)
				break;
			if (strcmp(s[j--], "the.") == 0 || strcmp(s[j], "this.") == 0 || strcmp(s[j], "that.") == 0)
				break;

			for (j = 0; j < i; j++) {
				k = 0;
				while (s[j][k]){
					if (s[j][k] == 'z')
						s[j][k] = 'a';
					else if (s[j][k] == '.')
						;
					else s[j][k]++;
					k++;
				}
			}
		}

	for (j = 0; j < i; j++)
		printf("%s ", s[j]);

	putchar('\n');

	return 0;
}

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

#define SIZE 3

using namespace std;

int main() {
	string str, value[SIZE] = {"the", "this", "that"};
	bool judge;
	while (getline(cin, str)) {
		judge = false;
		for (;;) {
			for (int j = 0; j < str.size(); j++) {
				if ('a' <= str[j] && str[j] <= 'y') {
					str[j]++;
				}
				else if (str[j] == 'z') {
					str[j] = 'a';
				}
			}

			for (int j = 0; j < SIZE; j++) {
				if (str.find(value[j]) != str.npos) {
					judge = true;
				}
			}

			if (judge) {
				cout << str << endl;
				break;
			}
		}
	}

	return 0;
}

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

int main(void)
{
    list<string> input;
    int dec = 0;
    string s;
    while (cin >> s)
    {
        input.push_back(s);

        if (dec == 0)
        {
            int d;
            d = s[0] - 't';

            string t = "";
            for (int i = 0; i < s.length(); i++)
                t += s[i] - d;

            if (t == "the" || t == "this" || t == "that")
                dec = d;
        }
    }
    for (list<string>::iterator i = input.begin(); i != input.end(); i++)
    {
        string out = *i;
        for (int j = 0; j < out.length(); j++)
        {
            if (out[j] != '.')
            {
                cout << (char)(out[j] - dec);
            }
            else
            {
                cout << '.';
            }
        }
        cout << ' ';
    }

    cout << endl;
    return 0;
}