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 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'){
			if(mozi == ' ' || mozi == '.'){
				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<string>
using namespace std;
string S; char T[29] = "abcdefghijklmnopqrstuvwxyz. "; int x[100000];
int main() {
	getline(cin, S);
	for (int i = 0; i < 100000; i++) { x[i] = 100000; }
	for (int i = 0; i < S.size(); i++) {
		for (int j = 0; j < 28; j++) {
			if (T[j] == S[i]) {
				x[i] = j;
			}
		}
	}
	for (int h = 0; h < 26; h++) {
		if (S.find("this") != string::npos){
			goto E;
		}
		if (S.find("that") != string::npos) {
			goto E;
		}
		if (S.find("the") != string::npos) {
			goto E;
		}
		for (int i = 0; i < S.size(); i++) {
			if (S[i] >= 'a') {
				if (S[i] == 'z') {
					S[i] -= 25;
				}
				else {
					S[i]++;
				}
			}
		}
	}
E:;
	cout << S << endl;
}

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

using namespace std;

int main() {
	string abc = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz";
	string s;
	getline(cin, s);
	while (true) {
		string::size_type index = s.find("the");
		string::size_type index2 = s.find("this");
		string::size_type index3 = s.find("that");
		if (index != string::npos || index2 != string::npos || index3 != string::npos) {
			break;
		}
		for (int i = 0; i < s.size(); i++) {
			for (int j = 0; j < 26; j++) {
				if (s[i] == abc[j]) {
					s[i] = abc[j+1];
					break;
				}
			}
		}
	}
	cout << s << 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[82];
    int dif;

    while (nullptr != fgets(buf, 82, 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;
}

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

int main(){
	char input[81],str[50][81];
	const char cmp[3][5]={"that","this","the"};
	int pos=0,last_pos=0,i,j,k,diff,n;
	bool flag;

		fgets(input,81,stdin);
		for(i=0;input[i]!='\0';i++){
			if(input[i]==' ' || input[i]=='.' || input[i]=='\n'){
				for(j=last_pos;j<i;j++){
					str[pos][j-last_pos]=input[j];
				}
				str[pos][j-last_pos]='\0';
				pos++;
				last_pos=i+1;
			}
		}

		n=0;
		flag=false;
		while(++n){
			for(i=0;i<pos;i++){
				for(j=0;str[i][j]!='\0';j++){
					str[i][j]+=1;
					if('a'>str[i][j]){
						str[i][j]+='z'-'a'+1;
					}else if('z'<str[i][j]){
						str[i][j]+='a'-'z'-1;
					}
				}
			}

			for(i=0;i<pos;i++){
				for(j=0;j<3;j++){
					if(strcmp(str[i],cmp[j])==0){
						flag=true;
                        j=3;i=pos;
					}
				}
			}
			if(flag) break;
		}

		int temp;
		for(i=0;input[i]!='\n';i++){
			if(input[i]!='.' && input[i]!=' '){
				temp=input[i]+n;
				if('a'>temp){
					input[i]=temp+'z'-'a'+1;
				}else if('z'<temp){
					input[i]=temp+'a'-'z'-1;
				}
			}
		}
		printf("%s",input);

	return 0;
}

C++: #include<iostream>
#include<string>
#include<sstream>
#include<vector>
using namespace std;
#define REP(i, j) for(int i = 0; i < j; i++)
#define FOR(i, j, k) for(int i = j; i < k; i++)
const int N = 30;

bool isOK(vector<string> v){
    REP(i, v.size()) if(v[i] == "the" || v[i] == "this" || v[i] == "that") return true;
    return false;
}

int main(){
    string str;
    while(getline(cin, str)){
        str = str.substr(0, str.length() - 1);
        string tmp;
        stringstream ss(str);
        vector<string> v;
        while(ss >>tmp) v.push_back(tmp);
        REP(z, N){
            REP(i, v.size()) REP(j, v[i].length()) v[i][j] = ++v[i][j] <= 'z'? v[i][j] : 'a';
            if(isOK(v)){
                cout <<v[0];
                FOR(i, 1, v.size()) cout <<" " <<v[i];
                cout <<'.' <<endl;
                break;
            }
        }
    }
    return 0;
}

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

int main(){
	stirng s;
	while(getline(cin,s)){
		while(s.find("the") == string::npos
				&& s.find("this") == string::npos
				&& s.find("that") == string::npos){
					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 <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
using namespace std;

int main(){
	char input[100],str[50][100];
	const char cmp[3][5]={"that","this","the"};
	int pos=0,last_pos=0,i,j,k,diff,n;
	bool flag;

		fgets(input,100,stdin);
		for(i=0;input[i]!='\0';i++){
			if(input[i]==' ' || input[i]=='.' || input[i]=='\n'){
				for(j=last_pos;j<i;j++){
					str[pos][j-last_pos]=input[j];
				}
				str[pos][j-last_pos]='\0';
				pos++;
				last_pos=i+1;
			}
		}

		n=0;
		flag=false;
		while(++n){
			for(i=0;i<pos;i++){
				for(j=0;str[i][j]!='\0';j++){
					str[i][j]+=1;
					if('a'>str[i][j]){
						str[i][j]+='z'-'a'+1;
					}else if('z'<str[i][j]){
						str[i][j]+='a'-'z'-1;
					}
				}
			}

			for(i=0;i<pos;i++){
				for(j=0;j<3;j++){
					if(strcmp(str[i],cmp[j])==0){
						flag=true;
                        j=3;i=pos;
					}
				}
			}
			if(flag) break;
		}

		int temp;
		for(i=0;input[i]!='\n';i++){
			if(input[i]!='.' && input[i]!=' '){
				temp=input[i]+n;
				if('a'>temp){
					input[i]=temp+'z'-'a'+1;
				}else if('z'<temp){
					input[i]=temp+'a'-'z'-1;
				}else{
					input[i]=temp;
				}
			}
		}
		printf("%s",input);

	return 0;
}