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++: #include<bits/stdc++.h>
using namespace std;
signed main(void){
	string s;
	while(getline(cin,s)){
		while(s.find("this")==s.npos&&s.find("that")==s.npos&&s.find("the")==s.npos)
			for(int i=0;i<(int)s.length();i++){
				if(s[i]>'z'||s[i]<'a')continue;
				if(s[i]!='z')s[i]++;
				else s[i]='a';
			}
		cout<<s<<endl;
	}
}

C++: #include<cstdio>
#include<cstring>

using namespace std;
int main(void)
{
	char a[1000] = {0};
	int i,j;
	while(scanf("%[^\n]",a) != EOF)
	{
		int as = strlen(a);
		for(i = 0;i < 26;i++)
		{
			if(strstr(a,"this") || strstr(a,"that") || strstr(a,"the")) break;
			for(j = 0;j < as;j++)
			{
				if(a[j] != 46 || a[j] != 32)
				{
					if(a[j] >= 'z')
					{
						a[j] = 'a';
					}
					else
					{
						a[j]++;
					}
				}
			}
		}
		printf("%s\n",a);
	}
	return 0;
}

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

enum result{ NOT_FOUND = -1 };
const int ALPHABET_SIZE = 26;
std::vector<std::string> keyWords = { "the", "that", "this" };

char caesar(const char&, const int);
std::string decode(std::string, int);
bool isKeyWord(std::string);
int askKey(std::vector<std::string>);
std::string dataShaping(std::string);

int  main(){

	std::string str;
	while (std::getline(std::cin, str)){
		std::vector<std::string> cryptography;
		int key;
		std::stringstream ss{ str };
		std::string word;

		while (std::getline(ss, word, ' '))
		{
			cryptography.push_back(word);
		}

		key = askKey(cryptography);
		if (key == NOT_FOUND){
			std::cout << "NOT_FOUND\n";
			return -1;
		}

		for (size_t i = 0; i < cryptography.size(); i++)
		{

			std::cout << decode(cryptography[i], key);
			if (i != cryptography.size() - 1){
				std::cout << ' ';
			}
		}

		std::cout << std::endl;
	}
	return 0;
}


char caesar(const char& chara, const int KEY){
	if (chara >= 'a' && chara <= 'z'){
		int charaIndex = chara - 'a';
		charaIndex = (charaIndex + KEY) % ALPHABET_SIZE;
		return 'a' + charaIndex;
	}
	return chara;
}

std::string decode(std::string str, int key){
	std::string decodedTexts;
	for (auto& chara : str)
	{
		decodedTexts += caesar(chara, key);
	}
	return decodedTexts;
}

bool isKeyWord(std::string str){
	for (auto& keyWord : keyWords)
	{
		if (dataShaping(str) == keyWord){
			return true;
		}
	}
	return false;
}

int askKey(std::vector<std::string> cryptography){
	for (auto& str : cryptography)
	{
		for (size_t i = 0; i <= ALPHABET_SIZE; i++)
		{
			if (isKeyWord(decode(str, i)))
			{
				return i;
			}
		}
	}
	return NOT_FOUND;
}

std::string dataShaping(std::string word){
	unsigned int wordSize = word.size();
	if (word[wordSize - 1] < 'a' || word[wordSize - 1] > 'z'){
		return word.substr(0, wordSize - 1);
	}
	return word;
}

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

int main(int argc, const char * argv[])
{
    string word;
    while (getline(cin, word)) {
        int cnt = 0;
        for (char tmp2 = word[0]; tmp2 <= 'z'; tmp2++) {
            if (tmp2 == 't') {
                break;
            }
            cnt++;
        }
        cnt = 0;
        for (char tmp2 = word[0]; tmp2 >= 'a'; tmp2--) {
            if (tmp2 == 't') {
                break;
            }
            cnt--;
        }
        if (word[1] + cnt == 'h') {
            if (word[2] + cnt == 'e') {
                for (int i = 0; i < word.size(); i++) {
                    if (word[i] == '.') {
                
                    }
                    else if (word[i] != ' ') {
                        word[i] += cnt;
                    }
                }
            }
            if (word[2] + cnt == 'i' && word[3] + cnt == 's') {
                for (int i = 0; i < word.size(); i++) {
                    if (word[i] == '.') {
                        
                    }
                    else if (word[i] != ' ') {
                        word[i] += cnt;
                    }
                }
            }
            if (word[2] + cnt == 'a' && word[3] + cnt == 't') {
                for (int i = 0; i < word.size(); i++) {
                    if (word[i] == '.') {
                        
                    }
                    else if (word[i] != ' ') {
                        word[i] += cnt;
                    }
                }
            }
        }
        cout << word << endl;
    }

    
    return 0;
}

C++: #include<iostream>
#include<string>
int main(){
	std::string str;
	while(std::getline(std::cin,str)){
	for(int i=0;i<str.size();i++){
		if(str[i]!=' ')str[i]+=1;
	}
	std::cout<<str<<std::endl;
	return 0;
}

C++: #include<cstdio>
#include<iostream>
#include<string>
using namespace std;
int main() {
	string t;
	while(getline(cin,t)) {
		for(int i = 0; i < 26; i++) {
			for(int j = 0; j < t.size(); j++) {
				if(t[j] == ' ' || t[j] == '.') continue;
				t[j] += 1;
				if(t[j] > 'z') t[j] -= 26;
			}
			if(t.find("the") != string::npos || t.find("that") != string::npos || t.find("this") != string::npos) {
				cout << t << endl;
				break;
			}
		}
	}
	return 0;
}

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

char next(char c)
{
    if ('a' <= c && c <= 'y') {
        return c+1;
    } else if (c == 'z') {
        return 'a';
    }
    return c;
}

int main()
{
    char str[81];
    //while(scanf("%[^\n]", str) != EOF) {
    scanf("%[^\n]",str);
    for(int j=0;j<26;++j) {
        if (strstr(str, "the") || strstr(str, "this") || strstr(str, "that")) {
            break;
        }
        for(int k=0,len=strlen(str);k<len;++k) {
            str[k] = next(str[k]);
        }
    }
    puts(str);
    //}
    return 0;
}

C++: #include<iostream>
#include<cstdio>
#include<cmath>
#include<vector>
#include<list>
#include<set>
#include<map>
#include<stack>
#include<queue>
#include<string>
#include<utility>
#include<algorithm>
#include<functional>
#include<deque>
#include<string.h>
#include<ctype.h>
#include<time.h>
#include<stdlib.h>
using namespace std;

char c[85];

bool search_th(){
  bool f = false;
  for (int i = 0; i < strlen(c); i++){
    if ((c[i] == 't' && c[i+1] == 'h' && c[i+2] == 'e') ||
        (c[i] == 't' && c[i+1] == 'h' && c[i+2] == 'i' && c[i+3] == 's') ||
        (c[i] == 't' && c[i+1] == 'h' && c[i+2] == 'a' && c[i+3] == 't')){
          f = true;  break;
    }
  }
  return f;
}

int main(){
  while (cin.getline(c, sizeof(c))){
    while (1){
      if (search_th() == true){
      cout << c << endl;
      break;
      }
      for (int j = 0; j < strlen(c); j++){
        if (c[j] >= 'a' && c[j] <= 'y'){
          c[j]++;
        } else if (c[j] == 'z'){
          c[j] = 'a';
        }
      }
    }
    for (int i = strlen(c); i < 85; i++){
      c[i] = '\0';
    }
  }
  return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
int main(){
	string s;
	while(getline(cin,s)){
		for(int i=0;i<27;i++){
			string t=s;
			for(int j=0;j<(int)s.size();j++){
				if('a'<=t[j]&&t[j]<='z')	t[j]='a'+(t[j]-'a'+i)%26;
			}
			if(t.find("the",0)!=string::npos){
				cout<<t<<endl;
				break;
			}
			else if(t.find("that",0)!=string::npos){
				cout<<t<<endl;
				break;
			}
			else if(t.find("this",0)!=string::npos){
				cout<<t<<endl;
				break;
			}
		}
	}
	return 0;
}