Go: package main

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

var scanner = bufio.NewScanner(os.Stdin)

func cipher(text string, direction int, int_shift int) string {
	shift, offset := rune(int_shift), rune(26)
	runes := []rune(text)
	for index, char := range runes {
		switch direction {
		case 1:
			if char >= 'a' && char <= 'z'-shift || char >= 'A' && char <= 'Z'-shift {
				char = char + shift
			} else if char > 'z'-shift && char <= 'z' || char > 'Z'-shift && char <= 'Z' {
				char = char + shift - offset
			}
		case -1:
			if char >= 'a'+shift && char <= 'z' || char >= 'A'+shift && char <= 'Z' {
				char = char - shift
			} else if char >= 'a' && char < 'a'+shift || char >= 'A' && char < 'A'+shift {
				char = char - shift + offset
			}
		}
		runes[index] = char
	}
	return string(runes)
}

func main() {
	for scanner.Scan() {
		infos := strings.Split(scanner.Text(), " ")
		plain := make([]string, len(infos))
		// fmt.Println(infos)
		Decryption:
			for i := 0; i < 26; i++ {
				for j := range infos {
					plain[j] = cipher(infos[j], 1, i)
				}
				for j := range plain {
					if plain[j] == "this" || plain[j] == "that" || plain[j] == "the" {
						break Decryption
					}
				}
			}
			fmt.Println(strings.Join(plain, " "))
	}
}

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

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

bool NotMatch( const std::string& str )
{
	return str.find("the") == std::string::npos && str.find("this") == std::string::npos && str.find("that") == std::string::npos;
}

int main()
{
	std::string str;
	while( getline(std::cin,str),str!="END OF INPUT" )
	{
		while( NotMatch(str) )
		{
			for( unsigned i=0; i<str.length(); ++i )
			{
				if( str[i]=='.' || str[i]==' ' || str[i]=='\n' )
				{
					continue;
				}

				if( str[i] == 'z' )
				{
					str[i] = 'a';
				}
				else
				{
					--str[i];
				}
			}
		}

		std::cout << str << '\n';
	}
}

C++: 
#include <cstdio>
#include <cstring>
#define N 1000000 + 10
char a[N];
int next[N];
void getNext(int len){
    next[0] = -1;
    int j = -1,i = 0;
    while (i < len) {
        if (j == -1 || a[i] == a[j]) {
            i ++;
            j ++;
            next[i] = j;
        }
        else j = next[j];
    }
}

int main()
{
    while (scanf("%s",a)) {
        if (a[0] == '.') {
            break;
        }
        int len = strlen(a);
        getNext(len);
        if (len % (len - next[len] == 0)) {
            printf("%d\n",len / (len - next[len]));
        }else {
            printf("1\n");
        }
    }
    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';
	  }else{
	    continue;
	  }
	}
      }
    }
    cout << s << endl;
  }
}


int main(){
  coding();
}

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

using namespace std;

bool is_finish(string s)
{
    string str;
    stringstream ss(s);
    while (ss >> str) {
        if (str == "the" ||
            str == "this" ||
            str == "that") return 1;
    }
    return 0;
}

int main()
{
    string s;
    while (getline(cin, s)) {
        s.pop_back();
        for (int i = 0; i < 26; i++) {
            for (char &c: s) {
                if (islower(c)) {
                    c = c + 1;
                    if (c > 'z') c = 'a';
                }
            }
            if (is_finish(s)) {
                break;
            }
        }
        cout << s << "." << endl;
    }
    return 0;
}

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


int main()
{
	string s, line[81];
	int counter = 0;
	getline(std::cin, s);
	s += "\n";

	//入力内容を配列にとる．
	string word = "";
	for (int i = 0; i < (signed)s.length(); i++){
		if (s[i] == ' ' || s[i] == '\n'){
			line[counter++] = word;
			word = "";
		}
		else{
			word += s[i];
		}
	}

	

	//ずらす数を探す
	int slide;
	for (int i = 0; i <= 26; i++){
		for (int j = 0; j < counter; j++){
			string word = "";
			for (int k = 0; k < (signed)line[j].length(); k++){
				if (line[j][k] != '.' && line[j][k] != ' '&& line[j][k] != '\n'){
					word += 'a' + (line[j][k] + i - 'a') % 26;
				}
				else{
					word += line[j][k];
				}
			}
			if (word == "the" || word == "this" || word == "that"){
				slide = i;
				goto jump;
			}

		}
	}

jump:

	//ずらすべき数だけずらす
	for (int i = 0; i < counter; i++){
		for (int j = 0; j <(signed)line[i].length(); j++){
			if (line[i][j] != '.' && line[i][j] != ' '&& line[i][j] != '\n'){
				line[i][j] = 'a' + (line[i][j] + slide - 'a') % 26;
			}
		}
	}

	//出力
	for (int i = 0; i < counter - 1; i++){
		cout << line[i] << " ";
	}
	cout << line[counter - 1] << endl;


	return 0;
}

C++: #include<stdio.h>
#include<string.h>
#include<string>
#include<math.h>
#include<iostream>
#include<algorithm>
using namespace std;

int main ()
{
    int i,j;
    char a[10000];
    while(gets(a)!=NULL)
    {
        int len=strlen(a);
        int x=a[0]-'t';
        for(i=0;i<len;i++)
        {
            if(a[i]>='a' && a[i]<='z')
            printf("%c",a[i]-x);
            else
                printf("%c",a[i]);
        }
        printf("\n");
    }
    return 0;
}