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 <string>

using namespace std;

void solve()
{
	string s;
	while(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];
					if(s[j] > 'z')
					{
						s[j] -= 26;
					}
				}
			}
			unsigned int pos1 = s.find("this");
			unsigned int pos2 = s.find("the");
			unsigned int pos3 = s.find("that");
			if(!(pos1 == string::npos && pos2 == string::npos && pos3 == string::npos))
			{
				cout << s << endl;
				break;
			}
		}
	}
}

int main()
{
	solve();
	return(0);
}

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

int main() {
	string cipher;
	getline(cin, cipher);
	
	for (int i = 0; i < 26;i++) {
		for (int n = 0;n < cipher.length();n++) {
			if (cipher.at(n) == 'z') {
				cipher.at(n) = 'a';
			}else if(cipher.at(n)>='a'&&cipher.at(n)<='y'){
				cipher.at(n)++;
			}
		}

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

C++: #include<iostream>

int isThisOrThatOrThe(std::string s){
  int dif=0;
  char cro = s[0];
  while(true){
    if(cro == 't')break;
    cro+=1;
    if(cro > 'z')cro = 'a';
    dif++;
  }
  std::string cpys;
  for(int i=0;i<s.length();i++){
    if(s[i]+dif > (int)'z')cpys += (char)((s[i]+dif)%123+'a'); 
    else cpys += (char)(s[i] + dif);
  }
  if(cpys == "that" || cpys == "this" || cpys == "the")return dif;
  return -1;
}


int main(){
  std::string s;
  getline(std::cin,s,'\n');
  bool piri = false;
  int st=0,dif = -12;
  for(int i=0;i<=s.length();i++){
    if(s[i] == ' ' || i == s.length() || s[i] == '.'){
      dif = isThisOrThatOrThe(s.substr(st,i-st));
      if(dif != -1){
	break;
      }
      st = i+1;
    }
  }

  for(int i=0;i<s.length();i++){
    if(s[i] == ' ' || s[i] == '.'){
      std::cout << s[i];
      continue; 
    }
    s[i]+dif > (int)'z'?std::cout << (char)((s[i]+dif)%123+'a'):std::cout << (char)(s[i]+dif);
  }
  std::cout << std::endl;
  return 0;
}

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

int main() {
	ios :: sync_with_stdio(false);
	string s;
	while(getline(cin, s)) {
		for(int t = 0; t < 26; t ++) {
			for(auto &c : s) if(isalpha(c)){
				c = (c - 'a' + 1) % 26 + 'a';
			}
			if(s.find("the") != -1 ||
				s.find("this") != -1 ||
				s.find("that") != -1) {
				cout << s << '\n';
				break;
			}
		}
	}
	return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
  int a[5],tmp;
  for(int i=0;i<5;i++){
    cin >> a[i];
  }
  for(int i=0;i<5;i++){
    for(int j=0;j<4;j++){
      if(a[j] < a[j+1]){
	tmp = a[j];a[j] = a[j+1]; a[j+1] = tmp;
      }
    }
  }
    for(int i=0;i<4;i++){
      cout << a[i] << " ";
    }
    cout << a[4] << endl;
}

C++: #include <iostream>
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <algorithm>
#include <stdlib.h>
#include <vector>

using namespace std;


int main(){

	vector<string> str, ans;
	string temp;
	int slide;

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

	for(int i=0 ; i<str.size() ; i++){
		ans.push_back(str[i]);
	}

	for(int i=0 ; i<25 ; i++){

		for(int j=0 ; j<str.size()-1 ; j++){
			for(int k=0 ; k<str[j].size() ; k++){
				str[j][k]++;
				if(str[j][k] > 'z'){
					str[j][k] = str[j][k] - 'z' + 'a' -1;
				}
			}
		}

		for(int k=0 ; k<str[str.size()-1].size()-1 ; k++){
			str[str.size()-1][k]++;
			if(str[str.size()-1][k] > 'z'){
				str[str.size()-1][k] = str[str.size()-1][k] - 'z' + 'a' -1;
			}
		}
		for(int k=0 ; k<str.size() ; k++){
			if(str[k] == "the" || str[k] == "that" || str[k] == "this"
					|| str[k] == "the." || str[k] == "that." || str[k] == "this."){
				slide = i+1;
				break;
			}
		}
	}

	for(int i=0 ; i<ans.size()-1 ; i++){
		for(int k=0 ; k<ans[i].size() ; k++){
			if((ans[i][k] + slide) > 'z'){
				ans[i][k] = ans[i][k] - 'z' + 'a' -1 + slide;
			}
		}
		cout << ans[i] << ' ';
	}

	for(int i=0 ; i<ans[ans.size()-1].size() ; i++){
		if((ans[ans.size()-1][i] + slide) > 'z'){
			ans[ans.size()-1][i] = ans[ans.size()-1][i] - 'z' + 'a' -1 +slide;
		}
	}
	cout << ans[ans.size()-1] << 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 == "") break;
        while (s.find("the") != string::npos || s.find("this") != string::npos || s.find("that") != string::npos) f(s);
        cout << s << endl;
    }
}

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

using namespace std;

int main()
{
	string S = "";

	getline(cin, S);

	for (int i = 0; i < 26; i++)
	{
		if (!(S.find("this") == S.npos && S.find("that") == S.npos && S.find("the") == S.npos))
		{
			cout << S;
		}

		for (string::size_type i = 0; i < S.size(); i++)
		{
			if (isalpha(static_cast<int>(S[i])))
			{
				if (S[i] == 'z')
				{
					S[i] = 'a';
				}
				else
				{
					S[i]++;
				}
			}
		}
	}

	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[] = {"the","this","that"};
    string in;
    while(true){
	getline(cin,in);
	if(cin.eof()) break;
	bool f = false;
	int d = 1;
	REP(i,30){

	    f = true;
	    REP(i,in.size()){
		if(in[i] == '.' || in[i] == ' ' || in[i] == '\n') continue;
		in[i]= (char)( 'a' + ( (int)(in[i] - 'a') + d) % 26);
	    }
	    vector<bool> flgs(3,false);
	    REP(j,3){
		if(in.substr(0,s[j].size()) == s[j] && in[s[j].size() + 1] == ' ') flgs[j] = true;
	    }
	    for(int i=0;i<in.size();i++){
		if(in[i] == ' '){
		    REP(j,3){
			if(in.substr(i+1,s[j].size()) == s[j] && in[i + s[j].size() + 1] == ' ') flgs[j] = true;
		    }
		}
	    }
	    if(flgs[0] || flgs[1] || flgs[2]) break;
	}
	cout << in << endl;
    }

    return 0;
}

C++: #define _CRT_SECURE_NO_WARNINGS

#include <stdio.h>
#include <ctype.h>

using namespace std;

inline char rotate(char c, int x){
    int r = x % 26;
    if(isalpha(c)){
        c -= 'a';
        c += r;
        c += 'a';
    }

    return c;
}

int main(int argc, char const* argv[])
{
    char buf[81];
    int dif;

    while (nullptr != fgets(buf, 81, stdin)) {
        dif = 't' - buf[0];
        for (int i = 0; ; i++) {
            if(buf[i] == '\n'){
                buf[i] = '\0';
                puts(buf);
                break;
            }
            buf[i] = rotate(buf[i], dif);
        }
    }

        return 0;
}