Go: package main

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

var scanner = bufio.NewScanner(os.Stdin)

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

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 {
		infos := strings.Split(nextString(), " ")
		plain := make([]string, len(infos))
		if reflect.DeepEqual(infos, []string{}) {
			break
		}
		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 <string>

bool is_valid(const std::string& str) {
	if (str.find("the") != std::string::npos ||
		str.find("this") != std::string::npos ||
		str.find("that") != std::string::npos) {
		return true;
	}
	return false;
}

int main() {
	std::string str;
	std::getline(std::cin, str);
	
	std::string ans;
	const int limit = 'z' - 'a' + 1;
	for (int i = 1; i <= limit; ++i) {
		for (auto c : str) {
			int elem = c + i;
			if (c >= 'a' && c <= 'z') {
				if (elem > 'z') {
					elem = 'a' + elem - ('z' + 1);
				}
				ans.push_back(elem);
			} else {
				ans.push_back(c);
			}
		}
		if (is_valid(ans)) {
			std::cout << ans << std::endl;
		}
		ans.clear();
	}
}

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

int main(){
    string before;
    while (getline(cin, before)) {
        int swich = 0;
        for (int i = 0;i < 26 ;i++) {
            for (int j = 0; j < before.size(); j++) {
                if (before[j]>'z') {
                    before[j] = 'a';
                }
                else if (isalpha(before[j])) {
                    before[j]++;
                }
            }
            for (int j = 0; j < before.size(); j++) {
                if (before[j]=='t'&& before[j+1]=='h'&& before[j+2]=='e') {
                    swich = 1;
                    break;
                }
                else if (before[j]=='t'&&before[j+1]=='h'&&before[j+2]=='a'&&before[j+3]=='t') {
                    swich = 1;
                    break;
                }
                else if (before[j]=='t'&&before[j+1]=='h'&&before[j+2]=='i'&&before[j+3]=='s') {
                    swich = 1;
                    break;
                }
            }
            if (swich == 1) {
                break;
            }
        }
        cout << before << endl;
    }
    return 0;
}

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

int main()
{
	int n;
	cin >> n;
	for (int i = 0; i < n; i++)
	{
		long double a[4][2];
		for (int I = 0; I< 4; I++)
		{
			for (int k = 0; k < 2; k++)
			{
				cin >> a[I][k];
			}
		}
		long double x, y;
		x = (a[1][0] - a[0][0]);
		y = (a[3][0] - a[2][0]);
		x = (x) ? (a[1][1] - a[0][1]) / x : 0;
		y = (y) ? (a[3][1] - a[2][1]) / y : 0;
		if (x == y)cout << "YES" << endl;
		else cout << "NO" << endl;
	}

}
/*
		x = (a[1][1] - a[0][1]) / (a[1][0] - a[0][0]);
		y = (a[3][1] - a[2][1]) / (a[3][0] - a[2][0]);*/

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

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


	scanf("%[^\n]",input);
	for(i=0;input[i]!='\0';i++){
		if(input[i]==' ' || input[i]=='.'){
			for(j=last_pos;j<i;j++){
				str[pos][j]=input[j];
			}
			str[pos][j]='\0';
			pos++;
			last_pos=i+1;
		}
	}

	for(i=0;i<pos;i++){
		for(j=0;j<4;j++){
			diff=str[i][0]-cmp[j][0];
			for(int k=1;str[i][k]!='\0';k++){
				str[i][k]-=diff;
			}
			if(strcmp(str[i],cmp[j])){
				j=4;i=pos;
				is_found=true;
			}
		}
	}

	for(i=0;input[i]!='\0';i++){
		if(input[i]!='.' && input[i]!=' '){
			input[i]-=diff;
		}
	}

	printf("%s\n",input);

	return 0;
}

C++: #include <cstdio>
#include <cstring>
using namespace std;
char The[][26] = { "the","uif","vjg","wkh","xli","ymj","znk","aol","bpm","cqn","dro","esp","ftq","gur","hvs","iwt","jxu","kyv","lzw","max","nby","ocz","pda","qeb","rfc","sgd" };
char This[][26] = { "this","uijt","vjku","wklv","xlmw","ymnx","znoy","aopz","bpqa","cqrb","drsc","estd","ftue","guvf","hvwg","iwxh","jxyi","kyzj","lzak","mabl","nbcm","ocdn","pdeo","qefp","rfgq","sghr" };
char That[][26] = { "that","uibu","vjcv","wkdw","xlex","ymfy","zngz","aoha","bpib","cqjc","drkd","esle","ftmf","gung","hvoh","iwpi","jxqj","kyrk","lzsl","matm","nbun","ocvo","pdwp","qexq","rfyr","sgzs" };
char buf[128], tmp[128];
int main()
{
	while (fgets(buf, 128, stdin)) {
		strcpy(tmp, buf);
		int k = 0;
		bool found = false;
		char* p = strtok(buf, " ");
		while (p) {
			if (!found) for (int i = 0; i < 26; ++i)  {
				if (!strcmp(p, The[i]) || !strcmp(p, This[i]) || !strcmp(p, That[i])) {
					found = true;
					k = i;
					break;
				}
			}
			p = strtok(NULL, " ");
		}
		for (int i = 0; tmp[i]; ++i) {
			if ('a' <= tmp[i] && tmp[i] <= 'z')
				putchar((tmp[i] - 'a' - k + 26) % 26 + 'a');
			else
				putchar(tmp[i]);
		}
	}
	return 0;
}

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

int main(){
    string str;
    
    while(getline(cin,str)){
        int flg = 0;
        
        while(true){
            for(int i = 0 ; i < str.length() ; i++){
                string key1 = str.substr(i,3),key2 = str.substr(i,4);
                if(key1 == "the" || key2 == "that" || key2 == "this") flg = 1;
            }
            
            if(flg) goto end;
            else{
                for(int j = 0 ; j < str.length() ; j++){
                    if('a' <= str[j] && str[j] <= 'z'){
                        str[j] -= 'a' - 'A';
                        str[j] = (char)('A'+(str[j]-'A'+26+1)%26);
                        str[j] += 'a' - 'A';
                    }
                    else continue;
                }
            }
        }
    end:
    cout << str << endl;
    }
        
    return 0;
}