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 <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 flag = 0;

int main(){
	while(flag == 0){
		scanf("%c",&mozi);
		if(first_check == 0)

		for(int i=0;i<26 && first_check == 0;i++){
			if(mozi == data[i]){
				first_position = i;
				zoom = first_position - 19;
				first_check = 1;
				break;
			}
		}




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

			if(mozi == '\n'){
				trans[position] = '\n';
				cout << trans << endl;
				first_check = 0;
				position = 0;
				memset(trans,'\0',sizeof(trans));
				flag = 1;
			}
		}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 <string>
int main(int argc, const char * argv[])
{
    using namespace std;
    string word;
    int i;
    while (getline(cin, word)) {
        for (i = 0; i < word.length(); i++) {
            if (isalpha(word[i])) {
                word[i] -= 4;
            }
        }
        cout << word << endl;
    }
    return 0;
}

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

string Caesar(string a) {
	for (int b = 0; b < a.length(); b++) {
		if (a[b] == 'z')a[b] = 'a';
		else if (a[b] >= 'a'&&a[b] < 'z')a[b] = a[b] + 1;
	}
	return a;
}
int main() 
{
	string a;
	while (getline(cin, a)) {
		for (int b = 0; b < 26; b++) {
		    a=Caesar(a);
			for (int c = 0; c < a.length() - 4; c++) {
				if (a[c] == 't'&&a[c + 1] == 'h') {
					if (a[c + 2] == 'e') { cout << a << endl; goto l; }
					else	if (a[c + 2] == 'a'&&a[c + 3] == 't') { cout << a << endl; goto l; }
					else	if (a[c + 2] == 'i'&&a[c + 3] == 's') { cout << a << endl; goto l; }
				}
			}
			if(a[a.length()-1]=='t'&&a[a.length() - 2] == 'h'&&a[a.length() - 3] == 'e') { cout << a << endl; break; }
		l:;
		}
	}
}

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

using namespace std;

char returnc(char c){
  if('a'<=c && c<='z'){
    if(c=='z')return 'a';
    return ++c;
  }
  return c;
}
int main(void){
  vector<string> ss;
  string s,str;
  while(getline(cin,s)){
  s+= " ";
  for(int i = 0 ; i < s.size() ; i ++){
    if(s[i] == ' '){
      ss.push_back(str);
      str="";
    }else{
      str+=s[i];
    }
  }
  bool ok=true;
  string out[] = {"this","that","the"};
  while(ok){
    for(int i = 0 ; i < ss.size(); i ++){
      //cout<<ss[i]<<endl;
      for(int j = 0 ; j < ss[i].size() ; j ++){
	ss[i][j] = returnc(ss[i][j]);
      }
      for(int j = 0 ; j < 3 ; j ++){
	if(ss[i] == out[j])ok=false;
      }
    }
  }
  for(int i = 0 ; i < ss.size()-1 ; i ++){
    cout<<ss[i]<<" ";
  }
  cout<<ss[ss.size() - 1]<<endl;
  }
}

C++: 
#include <iostream>
#include <cstdlib>
#include <cstdio>
#include <cmath>
#include <stack>
#include <cctype>
#include <complex>
#include <vector>
#include <algorithm>

using namespace std;


bool solve(){
	string str[100];
	int num=0;
	int k=0;
	while(cin>>str[k]){
		if(!num){
			for(int j=0;j<26;j++){
				string str2 = str[k];
				for(int i=0;i<str2.size();i++){
					int cnt=j;
					while(cnt){
						if(str2[i]=='a'){
							str2[i]='z';
						}else{
							str2[i]--;
						}
						cnt--;
					}
				}
	//			if(k==0) cout<< str2<<endl;
				if(str2=="the" || str2=="this" || str2=="that"){
					num = j;
					break;
				}
			}
		}
		k++;
	}
	for(int j=0;j<k;j++){
		for(int i=0;i<str[j].size();i++){
			int cnt = num;
			while(cnt){
				if(str[j][i]=='.'){
				}else if(str[j][i]=='a'){
					str[j][i]='z';
				}else{
					str[j][i]--;
				}
				cnt--;
			}
		}
		cout<<str[j];
		if(j!=k-1){
			cout<<" ";
		}else{
			cout<<endl;
		}
	}
	
	return true;
}

int main(){
	cout.setf(ios::fixed);
	cout.precision(10);
	solve();

	return 0;
}

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

char buf[99];

int main(){
    int i;

    for(;~scanf("%[^\n] ",buf);){
        for(i=0;;i++){
            if( buf[i]-buf[i+1]==12 || buf[i]-buf[i+1]==-14 ){
                break;
            }
        }
        int sa = buf[i] - 't';
        for(i=0; buf[i]!='\0'; i++){
            buf[i]=!putchar( buf[i] - (97>buf[i] ? 0: sa) );
        }
        puts("");
    }
    return 0;
}

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

int main() {
  char buf[82];
  char *p;
  int l;
  string str;

  cin.getline(buf, 82);
  l = strlen(buf);

  for (int i=0; i<26; i++) {
    for (int j=0; j<l; j++) {
      if (buf[j]>='a' && buf[j]<='z') {
        buf[j] = (buf[j]-'a'+1)%26 + 'a';
      }
    }
    str.assign(buf);
    if (str.find("the")!=string::npos ||
        str.find("this")!=string::npos ||
        str.find("that")!=string::npos) {
      break;
    }
  }

  cout << str;
  return 0;
}

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

using namespace std;

//the this that を探す
bool found(string s){
	if ((s.find("the") != -1) || (s.find("this") != -1) || (s.find("that") != -1))
		return true;
	else
		return false;
}


int main(){

	
	string str;
	getline(cin, str);
	string ans=str;

	int j = 0;

	while (!found(ans)){
		j++;
		for (int i = 0; i < str.size(); i++){
			if 
				(ans[i] == ' ') ans[i] = ans[i];
			else if 
				(ans[i] == '.') ans[i] = ans[i];
			else
				ans[i] = ((int)str[i] + j)>(int)'z' ? (char)((int)str[i] + j - 26) : (char)((int)str[i] + j);
		}
		if(found(ans)) break;
	} 
	
	cout << ans << endl;

	return 0;

}