Go: package main

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

var scanner = bufio.NewScanner(os.Stdin)

func nextString() string {
	scanner.Scan()
	return scanner.Text()
}

func incrementByte(b byte) byte {
	if b >= 97 && b < 122 {
		return b + 1
	} else if b == 122 {
		return 97
	}
	return b
}

func main() {
	scanner.Split(bufio.ScanLines)

	for {
		line := nextString()
		if len(line) == 0 {
			break
		}
		for i := 0; i <= 26; i++ {
			decoded := []byte{}
			for j := 0; j < len(line); j++ {
				decoded = append(decoded, incrementByte(line[j]))
			}
			line = string(decoded)
			if strings.Contains(line, "the") || strings.Contains(line, "this") || strings.Contains(line, "that") {
				fmt.Println(line)
				break
			}
		}
	}
}

C++: #define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <stdio.h>
#include <string>
#include <vector>
using namespace std;

int main() {
	char s[100] = {};
	while (fgets(s,sizeof(s),stdin)) {
		int start = 0, ofs=0,ofs2,chk=1;
		int buf;
		for (int i = 0; s[i] != '\n'; i++) {
			if (s[i] == ' ' || s[i] == '.') {
				if (i - start == 3) {
					chk = 1;
					ofs2 = (int)'t' - (int)(s[start]);
					for (int j = 1; j < 3; j++) {
						buf = (int)s[start + j] + ofs2;
						if (buf > (int)'z')
							buf -= 26;
						if (buf < (int)'a')
							buf += 26;
						if (j == 1 && buf != (int)'h') {
							chk = 0;
							break;
						}
						if (j == 2 && buf != (int)'e')
							chk = 0;
					}
					if (chk == 1) {
						ofs = ofs2;
						break;
					}
				}
				if (i - start == 4){
					chk = 1	;
					ofs2 = (int)'t' - (int)s[start];
					for (int j = 1; j < 4; j++) {
						buf = (int)s[start + j] + ofs2;
						if (buf > (int)'z')
							buf -= 26;
						if (buf < (int)'a')
							buf += 26;
						if (j == 1 && buf != (int)'h') {
							chk = 0;
							break;
						}
						if (j == 2 && buf == (int)'a')
							chk = 2;
						if (j == 2 && buf == (int)'i')
							chk = 3;
						if (j == 2 && buf != (int)'i'&&buf != (int)'a') {
							chk = 0;
							break;
						}
						if (j == 3 && chk == 2) {
							if (buf == (int)'t')
								chk = 1;
							else {
								chk = 0;
								break;
							}
						}
						if (j == 3 && chk == 3) {
							if (buf == (int)'s')
								chk = 1;
							else {
								chk = 0;
								break;
							}
						}
					}
					if (chk == 1) {
						ofs = ofs2;
						break;
					}
				}
				start = i + 1;
			}
		}
		for (int i = 0; s[i] != '\n'; i++) {
			int buf;
			if (s[i] != ' '&& s[i]!='.') {
				buf = (int)s[i] + (int)ofs;
				if (buf > (int)'z')
					buf -= 26;
				if (buf < (int)'a')
					buf += 26;
				s[i]=(char)buf;
			}
		}
		cout << s;
	}
	return 0;
}

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

int main(){

	string code;
	string word;
	bool found;

	while( getline(cin, code) ){
		found = false;

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


			for( int i=0;i<code.length();i++ ){
				if( code[i] >= 'a' && code[i] <= 'z' ){
					code[i] += 1;
					if(code[i]=='z'+1)code[i]='a';
				}
			}


			word = "";
			for( int i=0;i<code.length()+1;i++){
				if(code[i] >= 'a' && code[i] <= 'z' )
					word += code[i];
				else{
					if( word == "the" || word == "this" || word == "that" ){
						found = true;
					}
					word = "";
				}
				
			}
			if(found)break;
			
			
		
		}
		cout << code << " " << endl;

	}
	return 0;

}

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

int main(){

	string code;

	while( getline(cin, code) ){

		for( int j=0;j<25;j++ ){
			for( int i=0;i<code.length();i++ ){
				if( code[i] >= 'a' && code[i] <= 'z' ){
					code[i] += 1;
					if(code[i]=='z'+1)code[i]='a';
				}
			}
			if(code.find("the") != -1 || code.find("this") != -1 || code.find("that") != -1)
				break;		
		}
		cout << code << endl;
	}
	return 0;

}

C++: #include<iostream>
using namespace std;
int main()
{
	string s;
	for(;getline(cin,s);)
	{
		cin.ignore();
		bool f=0;
		for(;!f;)
		{
			for(int i=0;i<s.size();i++)
			{
				if(s[i]>='a'&&s[i]<='z')
				{
					s[i]--;
					if(s[i]<'a')s[i]='z';
				}
			}
			string t[3]={"the","this","that"};
			for(int i=0;!f&&i<3;i++)
			{
				for(int j=0;!f&&j+t[i].size()<s.size();j++)
				{
					if(s.substr(j,t[i].size())==t[i])
					{
						cout<<s<<endl;
						f=1;
					}
				}
			}
		}
	}
}

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

int main(){

	string code;

	while( getline(cin, code) ){

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

}

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';
				printf("%s",trans);
				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 <stdio.h>
#include <string.h>

int main(void){
    char buf[128];
    bool found;
    
    gets(buf);
    for(int i=0; i<26; i++){
        found = false;
        if (strstr(buf, "th")){
            found = (strstr(buf,"the") != NULL);
            found |= (strstr(buf,"this") != NULL);
            found |= (strstr(buf,"that") != NULL);
        }
        if (found) break;
        for (char *p = buf; *p != '\0'; p++){
            if (*p >= 'a' && *p <= 'z'){
                *p = (*p - 'a' + 1) % 26 + 'a';
            }
        }
    }
    printf("%s\n",buf);
    
    return 0;
}

C++: #include<string>
#include<iostream>
#include<algorithm>
using namespace std;
string henkan(string a)
{
	for (int i = 0; i < a.size(); i++)
	{
		if (a[i] != ' '&&a[i] != '.')
		{
			if (a[i] == 'z')a[i] = 'a';
			else 
				a[i] += 1;
		}
	}
	return a;
}
bool check(string a)
{
	string x[3] = { "the", "this", "that" };
	for (int i = 0; i < 3; i++)
	{
		if (a.find(x[i], 0) != string::npos)return false;
	}
	return true;
}
int main()
{
	while (1)
	{
		string a, b;
		if (cin >> b); else break;
		a.append(b);
		while (b.find('.', 0) == string::npos)
		{
			a.append(" ");

			cin >> b;
			a.append(b);
		}
		while (check(a))
		{
			a = henkan(a);
		}
		cout << a << endl;
	}
}

C++: #include <iostream>
#include <cmath>
#include <cstdio>
#include <vector>

using namespace std;
char encrypt[50];
char decrypt[50];
int key,i;

int main(){
    scanf("%[^\r\n]", encrypt);
    while(encrypt[i] != '\0'){
        if(encrypt[i] - encrypt[i+1] == 12){
            key = 't' - encrypt[i];
            break;
        }
        i++;
    }

    i = 0;
    while(encrypt[i] != '\0'){
        if(encrypt[i] <= 'z' && encrypt[i] >= 'a'){
            decrypt[i] = (encrypt[i] - 'a' + key) % 26 + 'a';
        }
        else{
            decrypt[i] = encrypt[i];
        }
        i++;
    }
    printf("%s\n", decrypt);
    return 0;
}